Network login/logout utility

0 Likes

By Bryan Keadle



01/15/2008 - Version - 2.2:



This update is to accommodate other languages as requested by a Dutch user. By adding an entry to the associated .INI, the name for "Desktop" can be defined in other languages; so using the Dutch language as an example, "Desktop" translates to "Bureaublad"



    [SETTINGS]    
DesktopName=Bureaublad




If you have workstations that auto-login to "Workstation Only" and *THEN* login to your Novell network, this utility is *especially* for you; skip down to the NETLOGIN.EXE DETAIL below. If you have shared, common-use workstations, and/or you are not using Dynamic Local User feature of Zenworks and your users are logging into the Windows desktop as a different user than their Novell login account, here's a solution you might consider:



I have a couple shared-use workstations that I prefer to have at a Windows desktop by default for convenience of use, and doesn't require people to have to login to access the local workstation applications or it's functions that don't require network access; for example, a "scanning station" - a computer equipped with a scanner, shared by all.



However, sometimes the user may need temporary network access to access their home directory or some network shared drive. Typically this would require them to right-click on the Novell Red-N icon in the system tray:





Though this is "doable", it's not the most intuitive, and many users (sadly) still don't know about the Red-N. Also, logging out is even less intuitive other than doing a Start / Shutdown / Logout. And what about those that forget to logout?...leaving themselves logged in to the network with their credentials - a security concern and an invitation for "identity abuse".



NETLOGIN.EXE DETAIL


NETLOGIN.EXE is a utility that provides convenient desktop access to both login to and logout from your Novell network. By adding NETLOGIN.EXE to your startup items, it checks to see if you are logged into the network by checking for some defined network path (e.g.: F:\PUBLIC). If the directory does not exist, it places an obvious Network Login icon on the desktop, and displays a *DISCONNECTED* system tray icon -- two visual indicators showing that the workstation is currently not logged into the network:





To login to the network, the user simply double-clicks on the Network Login icon on the desktop to get the Novell client login dialog:





Once logged in, on NETLOGIN.EXE's next poll cycle, it will change the desktop icon to a logout icon, update the System Tray icon to show a *CONNECTED* icon, and give a task bar button also indicating CONNECTED:





So, sound like a good idea, and want to give it a go? It's easy:



  1. Distribute the files contained in the .ZIP to a local directory on the workstation.

  • Add NETLOGIN.EXE to the workstation startup items (e.g.: Common Startup folder)

  • Ensure that the Novell client program, loginw32.exe, exists in the workstation path (manual Red-N icon login should be functional)


Configuration options for NETLOGIN.EXE are configured using NETLOGIN.INI existing in the same directory as the executable:



    [SETTINGS]
FREQ=30
DRVCHECK=F:\PUBLIC
LNENV=NWUSERNAME
LoginShortcutName=Login to network
LogoutShortcutName=Logout of network
InactivityTimeout=(minutes)


FREQ=number of seconds NETLOGIN checks for network connection status

DRVCHECK=directory path to check for to indicate workstation is logged into the network

LNENV=a DOS environment variable of the user's login name that you have set in your login script (if you want logged in user's name included in the logout icon on the desktop)

LoginShortcutName=Text for the "Login to network" icon on the desktop

LogoutShortcutName=Text for the "Logout of network" icon on the desktop

InactivityTimeout=number of minutes of inactivity before automatically logging out of the network



The frequency and drive to check can be overriden by specifying them on the command line when launching NETLOGIN:



SYNTAX: NetLogin (FREQ) (Drive to check)



e.g.: NetLogin 60 H:\



An additional feature of NETLOGIN.EXE is the ability to add additional login script actions, and even LOGOUT script actions! If NETLOGIN.INC exists in the same directory as NETLOGIN.EXE, it will be run as a batch script with a BEFORE parameter prior to logging in, and again with an AFTER parameter after login. Likewise, if NETLOGOUT.INC exists in the in the same directory as NETLOGIN.EXE, it will be run as a batch script with a BEFORE parameter prior to logging out, and again with an AFTER parameter after logout. This allows you the flexability to do any sort of pre/post actions before and after login or logout. Here is a template you can use for the NETLOGIN.INC / NETLOGOUT.INC as a starting point:



::NETLOGIN.INC



    @echo off
goto :BEGIN

NETLOGIN.INC - Login script for NETLOGIN.EXE

:BEGIN
if "%1"=="" goto :EOF
goto :%1

:BEFORE
echo PRE-LOGIN actions . . .

goto :EOF

:AFTER
echo POST-LOGIN actions . . .

goto :EOF



:NETLOGOUT.INC



    @echo off
goto :BEGIN

NETLOGOUT.INC - Logout script for NETLOGIN.EXE

:BEGIN
if "%1"=="" goto :EOF
goto :%1

:BEFORE
echo PRE-LOGOUT actions . . .

goto :EOF

:AFTER
echo POST-LOGOUT actions . . .

goto :EOF



The desktop icons created by NETLOGIN.EXE are created in the All User's Destop by default. However, if the Login/logout icon is found in the User's Desktop folder, it will keep the shortcuts in that user's desktop instead of All users. This allows you to associate the NETLOGIN.EXE functionality to a specific user on a workstation such as a standard STANDALONE account you provide for workstation-only logins (though, be sure that NETLOGIN.EXE is in the Users Startup items, not the All User's startup items).



(You can terminate NETLOGIN.EXE by holding down the CTRL and SHIFT key while right-clicking on the NETLOGIN system tray icon)



If you find this utility useful, please drop me an email and let me know how/why you're using it!



Tags:

Labels:

Collateral
How To-Best Practice
Comment List
Related
Recommended