Del Mar College
CIS 306 - Managing NOVELL® Networks
Instructor: Michael P. HarrisIntranetWare 4.11
![]()
![]()
IntranetWare Administration Guide
4. Using Login Scripts
Introduction
Use login scripts to connect your users' workstations to network resources whenever users log in to the network. With login scripts, you can
- Map drives and search drives
- Redirect print jobs to network print services
- Display greetings or messages to the users' workstation screens
- Set environment variables
- Execute programs or menus at startup
This section provides basic information about creating and editing login scripts using the NovellŪ Easy Administration Tool (NEAT). If you need additional information, refer to the NetWare 4.11 online documentation included in this product.
Login Script Types
NetWare includes several types of login scripts. On an IntranetWare TM for Small Business network, you probably need to use only container and user scripts. For example, if you are using drive mappings with MAP and printer port redirection with CAPTURE (two uses of login scripts that are built in) on Windows 95* and NetWare ClientTM 32 for Windows*, editing the login scripts may be unnecessary.
Refer to the table that follows for a description of login script types.
Table 4-1. Login Script Types
Type Description Container Runs first and provides global assignments for all users associated with the container (Organization object). Default Runs when a user script does not exist. User Runs last. Use it to customize the environment for a single user.
When a user is created in NEAT, mappings to the user's home directory and to the SYS:PUBLIC directory on the server are added to the user's login script.
We recommend using container scripts for company resources, such as printers and applications, in cases where every employee in the company needs access to them. We recommend using user scripts for users who need access to a specific application or other resource that other company employees do not need.
When a user logs in to the network, the container script commands run first. The user script commands run next and override any conflicting commands in the container login script. The user script is customized for each user and should be tailored to the user's needs.
Creating or Modifying a Login Script
You can access the login script through the NEAT utility.
Prerequisites
- Log in to the network as ADMIN.
- Double-click the NEAT icon.
Create or Modify a Container Script
Follow this procedure to create or change a container login script.
Procedure
From the Directory view, select the Organization for which you are creating the script.
From the General tab, click Edit Login Script .
An "Edit Login Script" screen appears.
Figure 4-1. Edit a Login Script
![]()
NOTE: Review "Login Script Conventions" and "Login Script Commands" before continuing.
Enter the login script commands for your users.
If you are unfamiliar with login script commands, click the Help button for examples of commands that you can block, copy, and paste into your scripts. See "Create Login Scripts" in Help.
Click OK to save the changes.
Example
MAP example. If you want all users to have easy access to the directory in which the WordPerfect* application is stored, you would press help, then block, copy, and paste one of the sample map commands into the login script as shown next.
Figure 4-2. Login Script Example
![]()
If the directory containing WordPerfect is located in APPS\WINAPPS\OFFICE \WP70 of your file system, you could modify the MAP command as follows:
MAP G:=ACME_SYS:APPS\WINAPPS\OFFICE\WP70
The G: specifies the drive to which you want to map the application.
If you change the home directory for a user, a new MAP command is added to the user's login script automatically.
For other uses of MAP, see "Directory and File Commands."
Table 4-2 shows examples of other script commands you can use in a container login script.
Create or Modify a User Script
To create or change a user login script, do the following.
Prerequisites
- Log in to the network as ADMIN or a user who has rights to modify the user's login script.
- Double-click the NEAT icon.
Procedure
From the Directory view, select the user for whom you are creating the script.
From the Property view, select the Login Script tab.
Click Edit Login Script.
The "Edit Login Script" screen appears. Commands that were added to the user's script when the user was created are displayed.
Figure 4-3. Modify a Login Script
![]()
Enter the desired login script commands for a user.
NOTE: Review "Login Script Conventions" and "Login Script Commands" before continuing.
If you are unfamiliar with login script commands, click the Help button for examples of commands that you can block, copy, and paste into your scripts. See "Create Login Scripts" in Help.
Click OK to save the changes.
Login Script Conventions
Read the following guidelines before you add lines to login scripts.
Table 4-3. Login Script Conventions
Type Description Case Use uppercase or lowercase characters.
Exception: Identifier variables (see "Login Script Identifier Variables") enclosed in quotation marks must be uppercase.Characters per line 150 maximum; 78 characters across the screen. Commands per line One. Lines that wrap automatically are considered one line.
To end commands, press < Enter>. Begin subsequent commands on a new line.
WRITE commands display best if the command is repeated at the beginning of each wrapped line.
Punctuation and programming symbols Type symbols (#, %, " ") and punctuation exactly as shown in the examples . Sequence ATTACH commands precede MAP commands.
Enter other commands in the order you want them to execute during login.
Group similar commands together to make them easier to read if sequence is not important.Blank lines These have no impact on login script execution. Use for visual separation if desired. Semicolons (;), asterisks (*), REM[ARK] These symbols are not interpreted as commands.
Placing any of these at the beginning of a command disables the command until the symbol is removed.Login Script Commands
The following table summarizes commands you can use in login scripts.
Table 4-4. Login Script Commands
Command Description BREAK ON/OFF Determines whether login script execution can be interrupted.
Format: BREAK ON|OFFCLS Clears the screen from the workstation at login.
Format: CLS
Example: C:> CLSCOMSPEC Locates the COMMAND.COM (DOS) file for the computer and DOS version to be used after an application program is exited.
Format: COMSPEC=[ path] COMMAND.COM
Path is a drive letter or full directory path beginning with the volume name.
Example: COMSPEC=S2:COMMAND.COMCONTEXT Sets a user's current context in the Directory tree.
Format: CONTEXT context
Context is the context you want the user to see after login.
Example: CONTEXT .SALES.ACME_USDISPLAY Displays the text of a specified file on the screen.
Format: DISPLAY [ path] filename
Example: You have created some messages and saved them in a file. You want to access that file so you can display the messages to clients' screens.
IF DAY_OF_WEEK="MONDAY" THEN
DISPLAY SYS: PUBLIC\MESSAGES\SYSNEW.TXT
ENDDOS BREAK Controls whether programs or DOS can be interrupted by pressing <Ctrl> <Break> or <Ctrl> <C>.
Format: DOS BREAK [ON | OFF]
Example: DOS BREAK OFF
This turns <Break> off so a program cannot be interrupted using < Ctrl> <Break>.DOS SET Sets the DOS variable to a specified value.
Format: DOS SET
Example: DOS SETDOS VERIFY Ensures that data copied to a local drive is correct.
Format: DOS VERIFY [ON | OFF]
Example: DOS VERIFY ONDRIVE Specifies which drive is the default.
Format: DRIVE <drive letter>
Example: DRIVE S:
Returns the default drive letter of S: .EXIT Terminates the login procedure to allow users to access another file, program, or menu.
Format: EXIT [" filename [ parameters]"]
Example: EXIT "memo.txt"
This exits the login and returns the user to the memo.txt file.# (EXTERNAL PROGRAM EXECUTION) Allows users to execute a command that is external to the login script. Should not be used with terminate-and-stay-resident programs.
Format: # [ path] filename [ parameter]
Example: # COMMAND.COM /C CLS
This command goes out of the login script to run another command, such as command.com.FIRE PHASERS Produces a phaser sound at the workstation.
Format: FIRE n
Example: FIRE 10
This is an easy command to test. Add the number of times you want to hear the phaser, log out, log in, and listen.GOTO Executes a portion of the login script out of regular sequence.
Format: GOTO label
Label indicates where the login script should continue executing.
Example: GOTO DISPLAY ACME_SYS: ACCT\MESSAGE.TXT
This moves the script to display the message in MESSAGE.TXT.IF...THEN Sets conditions under which login commands will be executed. See "Login Script Identifier Variables" for examples. INCLUDE Accesses text files (subscripts) not usually included in the login script.
Format: INCLUDE [ path] filename
Example: IF MEMBER OF "MKTG" INCLUDE ACME_SYS:APPS\MEMO.TXT
This command goes outside the login script, finds a text file, and prints it to the screen. This is useful when a message is too long to place in the login script. You can also use an object name in place of a filename.
LASTLOGINTIME Displays the last time a user logged in.
Format: LASTLOGINTIME
Example: LASTLOGINTIMEMACHINE Specifies which computer (machine name) is being used for the workstation in question.
Format: MACHINE= name
Example: MACHINE=IBM_PS2MAP Maps a drive to a directory on the network.
Format: MAP [ option] [ drive:= path]
Example: MAP G:=ACME_SYS:APPS\WINAPPSNO_DEFAULT Does not allow the default user login script to run.
Format: NO_DEFAULT
Example: NO_DEFAULTNOSWAP Prevents the login utility from being moved out of conventional memory into higher memory.
Format: NOSWAP
Example: NOSWAPPAUSE Stops the login script execution until a key is pressed. (This allows users to read screen messages. )
Format: PAUSE
Example: PAUSEPCCOMPATIBLE Informs the login program that a machine is IBM-PC compatible.
Format: PCCOMPATIBLE
Example: PCCOMPATIBLEREMARK Allows users to insert descriptive comments (as opposed to commands) into the login script.
Format: REM[ARK] [ text]
You can also use * [ text] or ;[ text]
Example: REM This is a test script.SET Sets a DOS or OS/2* environment variable to a specified value.
Format: [TEMP] SET name=" value"
Example: SET PROMPT = "$P$G"SWAP Moves the LOGIN utility out of conventional memory and into high memory or onto the disk.
Format: SWAP [ path]
Replace path with either a drive letter or full directory path beginning with the NetWare volume name.
Example: SWAP ACME_SYS:APPS\WP70TEMP SET See SET. WRITE Writes the specified string on the screen during login. See "Login Script Identifier Variables" next.
Login Script Identifier Variables
The following table lists all the available identifier variables allowed in a login script. These variables are used with the login script commands to increase efficiency.
For example, the script
WRITE "Good %GREETING_TIME, %LOGIN_NAME"
could mean "Good Morning/Afternoon/Evening, Kim." The %GREETING_TIME and %LOGIN_NAME command are examples of identifier variables.
Additional Information
For More Information About Go To CAPTURE "CAPTURE" in NetWare 4.11 Utilities Reference Login scripts "Login Scripts" in NetWare 4.11 Concepts MAP "Drive mapping" in NetWare 4.11 Concepts
"MAP" in NetWare 4.11 Utilities ReferenceSET "SET" in NetWare 4.11 Utilities Reference
Prior Main Index Next This page is maintained by: Michael P. Harris
viking.delmar.edu
Last Updated: Sep 20mpharris@surf.delmar.edu
Copyright © 1998