The following examples of login scripts may help you plan your own container, profile, and user login scripts. Each example login script is shown in a table.
The left column of each table shows the commands in the login script. The right column explains the command's purpose.
For instructions on creating login scripts, see Creating or Modifying a Login Script Using NetWare Administrator or Creating or Modifying a Login Script Using NETADMIN
The default login script executes the first time User object ADMIN logs in. It also executes for any users who do not have user login scripts.
You can't modify the default login script because it is coded into the LOGIN utility. Instead, you can create container, profile, or user login scripts.
The following table lists the content of the default login script.
Table 20. Default Login Script
| Login Script Command | Purpose |
|---|---|
MAP DISPLAY OFF |
Prevents map commands from displaying on the screen. |
MAP ERRORS OFF |
Prevents mapping errors from displaying on the screen. |
MAP *1:=SYS: |
Maps the first drive to volume SYS:. |
MAP *1:=SYS:%LOGIN_NAME |
Maps the first drive to the user's home directory, if LOGIN_NAME is the same as the user's home directory. If the user has no home directory, the first drive is still mapped to SYS:. |
IF %1=ADMIN THEN MAP *1:=SYS:SYSTEM |
If the login name is ADMIN, the first drive is mapped to SYS:SYSTEM instead of to the user's home directory. |
MAP P:=SYS:PUBLIC |
If the user logs in from an OS/2 workstation, drive P: is mapped to SYS:PUBLIC. This mapping is used by OS/2 workstations, as explained in IntranetWare Client for OS/2 User Guide. If the user is not using an OS/2 workstation, this drive mapping is not included in the default login script. |
MAP INS S1:=SYS:PUBLIC MAP INS S2:=SYS:PUBLIC\%MACHINE\%OS\ |
If the user is using a DOS or MS Windows workstation, the first search drive is mapped to SYS:PUBLIC, where DOS-based NetWare utilities are stored. Then the second search drive is mapped to the directory where DOS is stored. (The two MAP commands are joined by a semicolon.) If the user logs in from an OS/2 workstation, these drive mappings are not included in the default login script. |
MAP DISPLAY ON |
Allows MAP commands to display. |
MAP |
Displays a list of all drive mappings on the user's screen. |
The container login script should contain as much information as possible that applies to all users. An example is shown in the following table.
Table 21. Sample Container Login Script
| Login script command | Purpose |
|---|---|
MAP DISPLAY OFF |
Prevents MAP commands from displaying on the screen as they are assigned. |
MAP ERRORS OFF |
Prevents mapping errors from displaying on the screen. |
MAP *1:=SYS: |
Maps the first drive to volume SYS:. |
MAP *1:=SYS:%LOGIN_NAME |
Maps the first drive to the user's home directory, if LOGIN_NAME is the same as the user's home directory. If the user has no home directory, the first drive is still mapped to SYS:. |
IF %1=ADMIN THEN MAP *1:=SYS:SYSTEM |
If the login name is ADMIN, the first drive is mapped to SYS:SYSTEM instead of to the user's home directory. |
IF OS=OS2 THEN MAP P:=SYS:PUBLIC ELSE MAP INS S1:=SYS:PUBLIC MAP INS S2:=SYS:PUBLIC\%MACHINE\%OS\ END |
If the user logs in from an OS/2 workstation, drive P: is mapped to SYS:PUBLIC. This mapping is used by OS/2 workstations, as explained in IntranetWare Client for OS/2 User Guide. If the user is not using an OS/2 workstation, the first search drive is mapped to SYS:PUBLIC, where DOS-based NetWare utilities are stored. The second search drive is mapped to the directory where DOS is stored. If all workstations use DOS, you can use the following two commands instead of the IF...THEN command: MAP INS S1:=SYS:PUBLIC MAP INS S2:=SYS:PUBLIC\ %MACHINE\%OS\%OS_VERSION |
IF MEMBER OF WIN31 THEN MAP INS *2:=SYS:USERS\%LOGIN_NAME\WIN31 MAP INS S16:=SYS:APPS\WINAPPS\WIN31 SET TEMP=P:\USERS\%LOGIN_NAME\ WIN31\TEMP END |
If the user who logs in is a member of the Group object WIN31, the next available drive is mapped to that user's MS Windows directory. Then the next available search drive is mapped to the MS Windows directory for the WIN31 group. Finally, the MS Windows TEMP directory is set to a subdirectory of the user's MS Windows directory. |
MAP INS S16:=VOL1:APPL\WP |
Maps the next available search drive to the directory that contains WordPerfect. |
MAP INS S16:=VOL1:APPL\LOTUS |
Maps the next available search drive to the directory that contains Lotus. |
MAP INS S16:=SYS:EMAIL |
Maps the next available search drive to the EMAIL directory. |
MAP O:=SYS:DOC |
Maps drive O: to a directory necessary for running the electronic NetWare documentation (Novell DynaText*). |
IF MEMBER OF MANAGERS THEN MAP *3:=VOL1:PROJECTS\REPORTS END |
If the user belongs to the Group object MANAGERS, the login script maps the third network drive to the REPORTS directory. |
IF MEMBER OF TESTERS THEN MAP *4:=INPUT:STATUS\UPDATES END |
If the user belongs to the Group object TESTERS, the login script maps the fourth network drive to the UPDATES directory. |
COMSPEC=S2:COMMAND.COM |
Sets COMSPEC to the DOS command processor, located in the DOS directory (in the second search drive). |
SET PROMPT=$P$G |
Sets the prompt to display the user's current directory path, followed by the > symbol. |
MAP DISPLAY ON |
Allows MAP commands to display. |
MAP |
Displays a list of all drive mappings. |
WRITE |
Displays a blank line between the list of mappings and following lines. |
WRITE Good %GREETING_TIME, %LAST_NAME. |
Displays a greeting to the user. Example: Good morning, SMITH. |
WRITE Your password expires in %PASSWORD_EXPIRES days. |
Displays a message indicating the number of days before the user's password expires. |
FIRE 3 |
Makes the phaser sound occur three times to tell the user that the login process is complete. |
If you have groups of users with identical login script needs, you can create a Profile object, then create a login script for it. Then you can assign each user to be a member of that Profile object.
The following table shows an example of a profile login script you might create for users in the Profile object ACCOUNTING. This profile login script would execute after the container login script had executed.
Table 22. Sample Profile Login Script
| Login script command | Purpose |
|---|---|
MAP DISPLAY OFF |
Prevents MAP commands from displaying on the screen as they are assigned. |
MAP ERRORS OFF |
Prevents mapping errors from displaying on the screen. |
MAP INS S16:=VOL1:APPL\DB |
Maps the first available search drive (after those assigned in the container login script) to the directory that contains the database program. |
MAP *5:=VOL1:ACCOUNTS\NEW |
Maps the fifth network drive (after those assigned in the container login script) to the NEW subdirectory. |
MAP *6:=VOL1:ACCOUNTS\RECORDS |
Maps the sixth network drive (after those assigned in the container login script) to the RECORDS subdirectory. |
#WSUPDATE S1:IPXODI.COM /LOCAL |
Executes WSUPDATE, which updates the IPXODI.COM file on the user's workstation with a new version of the file located in the first search drive. |
MAP DISPLAY ON |
Allows MAP commands to display. |
MAP |
Displays a list of all drive mappings. |
WRITE |
Displays a blank line between the list of mappings and following lines. |
IF DAY_OF_WEEK=FRIDAY THEN WRITE Weekly progress report is due today FIRE 2 END |
On Fridays, the phaser sound occurs twice to alert the user while the message Weekly progress report is due today displays on the screen. |
PCCOMPATIBLE EXIT NMENU WORK |
Stops the profile login script and sends the user into a menu program called WORK. EXIT also prevents any user login scripts from executing. If you want a user login script to execute after the profile login script, put these lines at the end of the user login script instead. (DOS workstations with the machine name IBM_PC do not need the PCCOMPATIBLE line.) The EXIT command does not work on OS/2 workstations. |
The following table shows an example of a user login script for user Mary. The user login script executes after the container and profile login scripts have executed.
Table 23. Sample User Login Script
| Login script command | Purpose |
|---|---|
MAP DISPLAY OFF |
Prevents MAP commands from displaying on the screen as they are assigned. |
MAP ERRORS OFF |
Prevents mapping errors from displaying on the screen. |
MAP *7:=VOL1:MARY\PROJECTS\RESEARCH |
Maps Mary's seventh network drive (after those assigned in the container and profile login scripts) to the RESEARCH subdirectory in her home directory. |
MAP *8:=VOL1:FORMS |
Maps Mary's eighth network drive (after those assigned in the container and profile login scripts) to the FORMS directory. |
REM Mary needs access to FORMS while she's on the REM troubleshooting team. Remove this drive mapping REM when she's reassigned. |
This remark is intended as a reminder to the person who created the login script. This remark isn't displayed on the user's screen. (Because the remark is several lines long, each line starts with REM.) |
SET WP=/u-mjr/b-5 |
Sets Mary's environment variables for her word processing application. |
SET USR=mrichard |
Sets Mary's username (mrichard) for the electronic mail program. |
#CAPTURE Q=FAST_Q NB TI=10 NFF |
Executes the CAPTURE utility so Mary can print from nonnetwork applications. |
PCCOMPATIBLE EXIT NMENU TRAINING |
Stops the user login script and sends the user into a menu program called TRAINING. (DOS stations with the machine name IBM_PC don't need the PCCOMPATIBLE line.) EXIT doesn't work on OS/2 workstations. |