3.1 Login Script Conventions

The following table explains the conventions you should follow when creating login scripts.

Table 3-1 Login Script Conventions

Convention

Explanation

Minimum login script

No minimum. All types of login scripts are optional. Login scripts can vary from one line to many. There are no required commands.

Case

Either uppercase or lowercase is accepted. Exception: identifier variables enclosed in quotation marks and preceded by a percent sign (%) must be uppercase. See Section 3.2, Using Identifier Variables.

Characters per line

Maximum 512 characters per line, including any variables after they are replaced by their values; 78 characters per line (common screen width) is recommended for readability.

Punctuation and symbols

Type all symbols (#, %, ", _) and punctuation exactly as shown in examples and syntax.

Commands per line

Use one command per line. Start each command on a new line; press Enter to end each command and start a new command.

Lines that wrap automatically are considered one command.

Sequence of commands

Generally, list commands in the order that you want them to execute, with the following restrictions:

  • ATTACH commands (NetWare 3 only) must precede related MAP commands to avoid prompting the user for a username/password during login (see Section 3.6, ATTACH).

  • If you use # (see Section 3.4, #) or @ (see Section 3.5, @) to execute an external program, the command must follow any necessary MAP commands. If sequence is not important, group similar commands, such as MAP and WRITE commands, together to make the login script easier to read.

Blank lines

Blank lines don't affect login script execution. Use them to visually separate groups of commands.

Remarks

Lines beginning with REMARK, REM, an asterisk (*), or a semicolon (;) are comments, which don't display when the login script executes (see Section 3.23, REMARK).

Use remarks to record the purpose of each command or group of commands or to temporarily keep certain lines from executing.

Identifier variables

Type identifier variables exactly as shown. To display the value of an identifier variable as part of a WRITE command, you must enclose the identifier in quotation marks and precede it by a percent sign (%). See Section 3.2, Using Identifier Variables.

eDirectory attribute values

Any eDirectory attribute value, including extended names, can be read from a login script. The syntax for accessing eDirectory attributes is identical to common script variables with a few exceptions:

  • The eDirectory attribute must be at the end of the string.

  • If multiple variables are required, they must be in separate strings.

  • You must use the actual eDirectory attribute value names. You cannot use localized names or nicknames. Some common eDirectory attribute names are listed in Section 3.2, Using Identifier Variables.

  • You must have the Read right to read the value of objects other than values associated with your own User object.

If the name contains a space, you can replace it with an underscore (_) but it is not required. Both of the following examples are correct syntax:

map n %home directory

map n %home_directory

eDirectory object mappings

eDirectory objects, such as cluster-enabled volumes, can be mapped in the login script using the object's fully distinguished name and context preceded by a leading dot (.).

To map to a cluster-enabled volume, you would use the following syntax:

MAP N:=.eDirectory_object’s_fully_distinguished_name_including_context

For example:

MAP N:=.cluster2_vol1.xyz.provo.novell

For more information on mapping, see Section 3.18, MAP.