Login Scripts

A login script is a file that contains a set of valid NetWare login command statements.

System login script
used by the network administrator to establish a system-wide configuration.
User login script
customized for individual user requirements and executed after the system login script.
Default login script
for users without a personalized user login script.

Example

WRITE "\nGood %GREETING_TIME, %FULL_NAME."
WRITE "You are attached to server %FILE_SERVER."
WRITE "Today is %DAY_OF_WEEK, %MONTH_NAME %DAY, %YEAR."
WRITE "The time now is %HOUR:%MINUTE:%SECOND %AM_PM.\n"

MAP DISPLAY OFF
MAP F:=SYS:
MAP G:=DATA:COURSES\COMP642
MAP ROOT H:=DATA:USERS\%LOGIN_NAME

MAP INS S1:=SYS:PUBLIC
MAP INS S2:=SYS:LOGIN

DRIVE H:
MAP DISPLAY ON
MAP

Login Script Variables

GroupVariableDescription
DateDAY Day number for the current month. Possible values range from 01 to 31.
DateDAY_OF_WEEK Name of current day of week. Possible values are Monday, Tuesday, etc.
DateMONTH The number for the current month. Possible values range from 01 to 12.
DateMONTH_NAME Name of current month. Possible values are January, February, etc.
DateNDAY_OF_WEEK The current weekday number, ranges from 1 for Sunday to 7 for Saturday.
DateSHORT_YEAR The last two digits of the current year, for example 98 or 99.
DateYEAR The full four-digit year, for example 1998 or 1999.
NetworkNETWORK_ADDRESS The network address of the cabling system to which the user's workstation is attached. Expressed as an eight-digit hexadecimal number.
NetworkFILE_SERVER The name of the current file server.
TimeAM_PM Day or night (A.M. or P.M.).
TimeGREETING_TIME Displays welcome messages. Possible values are: Morning, Afternoon, or Evening.
TimeHOUR The current hour of day or night, ranging from 01 through 12.
TimeHOUR24 The current hour in 24-hour mode, ranging from 00 for 12:00 A.M. through 23 for 11:00 P.M.
TimeMINUTE The current minute, ranging from 00 through 59.
TimeSECOND The current second, ranging from 00 through 59.
UserFULL_NAME The user's full name, as defined from SYSCON or USERDEF.
UserLOGIN_NAME The user's unique login name.
UserUSER_ID The hexadecimal number assigned by NetWare for the user login name.
WorkstationOS The workstation's operating system. Default value is MSDOS.
WorkstationOS_VERSION The version of DOS being used on the workstation that is processing the login script. For example, V6.20.
WorkstationMACHINE The long machine name that can be assigned in the SHELL.CFG or NET.CFG file. Default value is IBM_PC.
WorkstationP_STATION The node address of the network card in the workstation. Expressed as a 12-digit hexadecimal value.
WorkstationSMACHINE The short machine name that can be assigned in the SHELL.CFG or NET.CFG file. Default value is IBM.
WorkstationSTATION The connection number for the current station.
WorkstationSHELL_TYPE The workstation's shell version number.

Login Script Commands

  1. MAP [ROOT|INS|DEL] [drive:=path] MAP {DISPLAY|ERRORS} {ON|OFF}
  2. COMSPEC=[path]COMMAND.COM
  3. WRITE "text [control string] [%variable]" \r carriage return and line feed \n blank line \" quotation mark \7 beep
  4. PAUSE
  5. [F]DISPLAY [directory-path] filename
  6. ATTACH [fileserver[/username[;password]]]
  7. # [path]filename [parameters]
  8. IF condition THEN command MEMBER OF "group" IF condition THEN variable=value command AND | OR ELSE command END
  9. DRIVE drive-letter:
  10. EXIT "command-line"
  11. INCLUDE [path]filename
  12. GOTO label label:
  13. FIRE [PHASERS] n [TIMES]
  14. REM|;|*|REMARK
  15. [DOS] SET variable="value"
  16. BREAK {ON|OFF}

Login Script Execution

How login scripts get executed when you log in

Go Back to the COMP642 Page