Login Scripts
When you connect to a fileserver as a legitimate user, the fileserver first checks to see if a SYSTEM
LOGIN SCRIPT exists, and if it does it runs the script. This script is run by every user if it exists and
sets up the system environment for the user in terms of drive mappings, printer assignments etc. If no
EXIT command is encountered when processing this script, a USER LOGIN SCRIPT is run, if it
exists. This is used to place commands that will only affect the particular user and must end with an
EXIT command. Usually the EXIT command has a string of up to 14 letter after it telling it to run
another program, usually a menu program.
If neither of the above exist, then a default login script is run and this is supplied with Novell.
When setting up a network you can either have a long SYSTEM LOGIN SCRIPT and short or no
USER LOGIN SCRIPTS, or a short SYSTEM LOGIN SCRIPT and long USER LOGIN SCRIPTS. At
Heathmont College there is nothing to distinguish most of our users, and so I have implement the first
option.
The system login script is kept in the F:\PUBLIC subdirectory and is called NET$LOG.DAT, whereas
the user login scripts are kept in a subdirectory of the F:\MAIL directory. This subdirectory name is
the identity number that Netware has assigned you (this identity number is a hex number and you can
see it in Other Information in SYSCON).
See Appendix 2 for Login Script commands and login script variables.
SYSTEM LOGIN SCRIPT for HEATHMONT2 file server
MAP DISPLAY OFF
Rem Set Dos Variables
DOS SET USER="%LOGIN_NAME"
DOS SET TASK="%STATION"
DOS SET NETNUMB="%P_STATION"
IF LOGIN_NAME <> "ANY" THEN
MAP S1:=SYS:PUBLIC
MAP S2:=S1:%OS/%OS_VERSION
COMSPEC=S2:COMMAND.COM
MAP S3:=SYS:PUBLIC\XTNET256
MAP S4:=SYS:WINDOWS
MAP M:=SYS:MENU
IF MEMBER OF "STAFF" THEN
MAP S:=SYS:SYSTEM
END
IF MEMBER OF "A6GROUP" or MEMBER OF "CD" THEN
MAP ROOT I:=HEATHMONT2\MUSICAL_INST:
MAP ROOT J:=HEATHMONT2\WBME311:
MAP ROOT K:=HEATHMONT2\SAGE1_95:
MAP ROOT L:=HEATHMONT2\ENCARTA_95:
MAP ROOT N:=HEATHMONT2\ISSUES_'95:
DOS SET INFOCD="J:"
DOS SET INFOTMP="H:"
DOS SET INFOBOOK="H:"
DOS SET INFOUSER="H:"
END
IF "%LOGIN_NAME"="SUPERVISOR" THEN
MAP H:=SYS:HOME\SUPER
ELSE
MAP ROOT H:=SYS:HOME\%LOGIN_NAME
END
Rem Print Capture commands for user groups
IF MEMBER OF "LEFT" THEN
#CAPTURE Q=A5LEFT NB NFF NT TI=10
END
IF MEMBER OF "RIGHT" THEN
#CAPTURE Q=A5RIGHT NB NFF NT TI=10
END
IF MEMBER OF "A6LEFT" THEN
#CAPTURE Q=A6NECLEFT NB NFF NT TI=10
END
IF MEMBER OF "A6RIGHT" THEN
#CAPTURE Q=A6NECRIGHT NB NFF NT TI=10
END
IF MEMBER OF "STAFF" THEN
#CAPTURE Q=REC NB NFF NT TI=10
END
Rem Library TP computer
IF P_STATION="0000B460D03D" AND NOT MEMBER OF "STAFF" THEN
#CAPTURE L=1 Q=LIB_EPSONLQ_200 NB NFF NT TI=10
END
Rem Library Unitron Computer
IF P_STATION="004F4B00233B" AND NOT MEMBER OF "STAFF" THEN
#CAPTURE L=1 Q=LIB_EPSONLQ_200 NB NFF NT TI=10
END
END
Rem The normal users in A5 and A6 will now exit and run Doug menu.
IF MEMBER OF "A5GROUP" OR MEMBER OF "A6GROUP" THEN
DRIVE M:
EXIT "MENUB STUDENT"
END
Rem User Menu scripts will be run for other users
DRIVE F:
MAP DISPLAY ON
Sample user login script (we no longer use these for students)
Rem SYS4
DRIVE M:
EXIT "MENUB STUDENT"
NOTE
IF YOU MAKE A MISTAKE IN YOUR LOGIN SCRIPT THAT MAKES IT
IMPOSSIBLE FOR YOU TO LOGIN TO THE SYSTEM, OR PUTS YOU IN
AN AWKWARD SITUATION, USE
LOGIN /S TO BYPASS THE LOGIN SCRIPT.
|