2.5 Samples of Login Script Commands

2.5.1 If Member Of Script Sample

The following is a sample of an IF...THEN statement that uses the identifier variable MEMBER. For more information, on these commands, see Section 3.15, IF...THEN and Section 3.2, Using Identifier Variables for more information on using identifier variables like MEMBER.

IF MEMBER OF ".USER.MYCOMPANY" THEN WRITE "You are a member of User"
IF NOT MEMBER OF ".USER.MYCOMPANY" THEN WRITE "You are not a member of User"
IF MEMBER OF ".GROUP10.MYCOMPANY" THEN WRITE "Group 10 is the Best!"

2.5.2 MAP Command Script Sample

The following is a sample of MAP command statements used to map to

For more information, on these commands, see Section 3.18, MAP.

MAP DISPLAY ON
MAP DISPLAY ON E:=FILE_SERVER/SYS:
MAP H:=.FILE_SERVER_SYS.MYCOMPANY
MAP D:=FILE_SERVER/SYS:;G:=FILE_SERVER/SYS:
MAP ERRORS OFF D:=FILE_SERVER/SYS:;G:=FILE_SERVER/SYS:;J:=FILE_SERVER/SYS:/JAVA
MAP X:=\\FILE_SERVER\SYS;G:=FILE_SERVER/SYS:
MAP INS K:=FILE_SERVER/SYS:/JAVA;Y:=FILE_SERVER\SYS:\JAVA
MAP Z:=\\FILE_SERVER\SYS\JAVA
MAP INS J:=FILE_SERVER/SYS:/JAVA;Y:=\\FILE_SERVER\SYS\JAVA
MAP DEL C:
MAP K:=%HOME_DIRECTORY
MAP DISPLAY OFF
MAP INS
F:=\\FILE_SERVER\SYS\LOGIN;H:=\\FILE_SERVER\SYS\LOGIN\;Y:=FILE_SERVER/SYS:
MAP L:=\\FILE_SERVER\SYS\LOGIN\
MAP ROOT G:=FILE_SERVER/SYS:
MAP ERRORS ON
MAP DISPLAY OFF F:=FILE_SERVER/SYS:
MAP DISPLAY OFF INS F:=FILE_SERVER/SYS:
MAP DEL D:
MAP L:=.FILE_SERVER_SYS.MYCOMPANY/LINUX
MAP P:=.FILE_SERVER_SYS.MYCOMPANY:LINUX
MAP Q:=.FILE_SERVER_SYS.MYCOMPANY:/LINUX
MAP O:=X:=.CN=DATA.O=MYCOMPANY

2.5.3 Identifier Variables Script Sample

The following is a sample of how identifier variables can be used in a script. For more information, on these variables, see Section 3.2, Using Identifier Variables.

WRITE "DAY %DAY"
WRITE "DAY OF WEEK  %DAY_OF_WEEK"
WRITE "MONTH %MONTH"
WRITE "MONTH NAME %MONTH_NAME"
WRITE "NDAY OF WEEK %NDAY_OF_WEEK"
WRITE "SHORT_YEAR %SHORT_YEAR"
WRITE "YEAR  %YEAR"
SET TESTING="ENVDATA"
WRITE "SET DATA IS: %<TESTING>"
WRITE "ACCESS SERVER: %ACCESS_SERVER"
WRITE "PARAMETER %1"
WRITE "DIALUPIS:";DIALUP
WRITE "OFFLINE IS %OFFLINE"
WRITE "FILE_SERVER: %FILE_SERVER"
WRITE "NETWORK_ADDRESS%NETWORK_ADDRESS"
WRITE "SURNAME: %SURNAME"
WRITE "AM PM %AM_PM"
WRITE "GREETING TIME%GREETING_TIME"
WRITE "HOUR %HOUR"
WRITE "HOUR24%HOUR24"
WRITE "MINUTE %MINUTE"
WRITE "SECOND %SECOND"
WRITE "CN IS: %CN"
WRITE "LOGIN ALIAS CONTEXT%LOGIN_ALIAS_CONTEXT"
WRITE "FULL NAME IS: %FULL_NAME"
WRITE "LAST NAME IS: %LAST_NAME"
WRITE "LOGIN CONTEXT IS: %LOGIN_CONTEXT"
WRITE "LOGIN NAME IS: %LOGIN_NAME"
IF MEMBER OF "USERS.MYCOMPANY" THEN WRITE "USER IS MEMBER OF USERS.MYCOMPANY"
IF NOT MEMBER OF "USERS.MYCOMPANY" THEN WRITE "USER IS NOT A MEMBER OF USERS.MYCOMPANY"
WRITE "PASSWORD EXPIRES: %PASSWORD_EXPIRES"
WRITE "REQUESTER CONTEXT: %REQUESTER_CONTEXT"
WRITE "USER ID %USER_ID"
WRITE "HOME DIRECTORY IS %HOME_DIRECTORY"WRITE "MACHINE IS: %MACHINE"
WRITE "NETWARE REQUESTER: %NETWARE_REQUESTER"
WRITE "OS IS: %OS"
WRITE "OS VERSION IS: %OS_VERSION"
WRITE "P STATION IS: %P_STATION"
WRITE "PLATFORM IS: %PLATFORM"
WRITE "SHELL TYPE IS; %SHELL_TYPE"
WRITE "SHELL VERSION IS: %SHELL_VERSION"
WRITE "SMACHINE IS: %SMACHINE"
WRITE "STATION IS: %STATION"
WRITE "WINVER IS: %WINVER"IF JUNK THEN WRITE "JUNK"
WRITE "TESTING FOR AN INVALID IDENTIFIER(MYID) %MYID"WRITE "DAY IS";DAY
WRITE "DAY %DAY"
WRITE "DAY OF WEEK  %DAY_OF_WEEK"
WRITE "MONTH %MONTH"
WRITE "MONTH NAME %MONTH_NAME"
WRITE "NDAY OF WEEK %NDAY_OF_WEEK"
WRITE "SHORT_YEAR %SHORT_YEAR"
WRITE "YEAR  %YEAR"SET TESTING="ENVDATA"
WRITE "SET DATA IS: %<TESTING>"
WRITE "ACCESS SERVER: %ACCESS_SERVER"
WRITE "PARAMETER %1"WRITE "DIALUPIS:";DIALUP
WRITE "OFFLINE IS %OFFLINE"
WRITE "FILE_SERVER: %FILE_SERVER"
WRITE "NETWORK_ADDRESS %NETWORK_ADDRESS"
WRITE "SURNAME: %SURNAME"WRITE "AM PM %AM_PM"
WRITE "GREETING TIME %GREETING_TIME"
WRITE "HOUR %HOUR"
WRITE "HOUR24 %HOUR24"
WRITE "MINUTE %MINUTE"
WRITE "SECOND %SECOND"WRITE "CN IS: %CN"
WRITE "LOGIN ALIAS CONTEXT %LOGIN_ALIAS_CONTEXT"
WRITE "FULL NAME IS: %FULL_NAME"
WRITE "LAST NAME IS: %LAST_NAME"
WRITE "LOGIN CONTEXT IS: %LOGIN_CONTEXT"
WRITE "PASSWORD EXPIRES: %PASSWORD_EXPIRES"
WRITE "REQUESTER CONTEXT: %REQUESTER_CONTEXT"
WRITE "USER ID %USER_ID"
WRITE "MACHINE IS: %MACHINE"
WRITE "NETWARE REQUESTER: %NETWARE_REQUESTER"
WRITE "OS IS: %OS"
WRITE "OS VERSION IS: %OS_VERSION"
WRITE "P STATION IS: %P_STATION"
WRITE "PLATFORM IS: %PLATFORM"
WRITE "SHELL TYPE IS; %SHELL_TYPE"
WRITE "SHELL VERSION IS: %SHELL_VERSION"
WRITE "SMACHINE IS: %SMACHINE"
WRITE "STATION IS: %STATION"
WRITE "WINVER IS: %WINVER"

2.5.4 Display Script Sample

The following is a sample of how the DISPLAY command can be used in a script. For more information, see Section 3.9, DISPLAY.

SET SERVER="FILE_SERVER"
DISPLAY \\FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT
DISPLAY \\FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT\
DISPLAY \\%FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT
DISPLAY FILE_SERVER\SYS:\VOL1\LOGINSCRIPT.TXT
DISPLAY %FILE_SERVER\SYS:\VOL1\LOGINSCRIPT.TXT
DISPLAY %FILE_SERVER\SYS:VOL1\LOGINSCRIPT.TXT
DISPLAY SYS:VOL1\LOGINSCRIPT.TXT
DISPLAY SYS:/VOL1/LOGINSCRIPT.TXT
DISPLAY /ETC/PAM.D/NWLOGIN
DISPLAY .MYCOMPANY

2.5.5 Fdisplay Script Sample

The following is a sample of how the FDISPLAY command can be used in a script. For more information, see Section 3.12, FDISPLAY.

SET SERVER="FILE_SERVER"
FDISPLAY \\FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT
FDISPLAY \\%FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT
FDISPLAY FILE_SERVER\SYS:\VOL1\LOGINSCRIPT.TXT
FDISPLAY %FILE_SERVER\SYS:\VOL1\LOGINSCRIPT.TXT
FDISPLAY .MYCOMPANY

2.5.6 Include Script Sample

The following is a sample of how the INCLUDE command can be used in a script. For more information, see Section 3.16, INCLUDE.

SET SERVER="FILE_SERVER"
INCLUDE \\FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT
INCLUDE \\FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT\
INCLUDE \\%FILE_SERVER\SYS\VOL1\LOGINSCRIPT.TXT
INCLUDE %FILE_SERVER\SYS:\VOL1\LOGINSCRIPT.TXT
INCLUDE %FILE_SERVER/SYS:/VOL1\LOGINSCRIPT.TXT
INCLUDE .MYCOMPANY