Working with Login Scripts

There are four types of login scripts:

  • Container: Sets the general environment for all users in that container. Novell Login executes container login scripts first. Container login scripts can be associated with Organization or Organizational Unit objects. A user login will use only the container login script for the container in which their object resides.

  • Profile: Sets environments for several users at the same time. Novell Login executes a profile login script after the container login script. Profile login scripts are associated with profile objects. A user can be assigned only one profile login script but can choose other profile login scripts.

  • User: Sets environments (such as printing options or an email username) specific to a single user. Novell Login executes the user login script after any container and profile login scripts have executed. User login scripts are associated with User objects. A user can have only one user login script.

  • Default: Contains only essential commands, such as drive mappings to NetWare utilities, and cannot be edited. It runs if a user (including user admin) doesn't have a user login script, even if a container or profile login script exists. You can prevent the default login script from running by placing the NO_DEFAULT command in a container or profile login script.

NOTE

Before you create or modify login scripts, you must have the Write property right to the object that will contain the login script. The Organization, Organizational Unit, Profile, or User object that you plan to assign the login script to must exist.


Creating or Modifying a Login Script

To create or modify a login script with ConsoleOne, follow these steps:

  1. Launch iManager and click View Objects in the header frame.

  2. Browse to the object whose login script you want to create or modify.

  3. Click the object and select Modify Object. Select the Login Script tab to open the login script editor.

  4. Enter the login script commands and information into the Login Script text box, or specify a profile script to associate with this object. Click OK to save your changes when finished.

Maintaining many user login scripts can be time-consuming . Therefore, you should try to include as much customization information as possible in the container and profile login scripts, which are fewer in number and easier to maintain. For example:

  • If all users need access to the NetWare utilities in the same volume, put the search drive mapping to that volume in a single container login script rather than in every user login script.

  • Create profile login scripts if multiple objects have identical login script needs.

  • In user login scripts, include only those individual items that can't be included in profile or container login scripts.

  • If you don't want to create any user login scripts and you don't want the default login script to execute for any users, you can disable the default login script by including the NO_DEFAULT command in the container or profile login script.

WARNING

Because up to three login scripts can execute whenever a user logs in, conflicts can occur and consecutive login scripts can overwrite drive mappings. It is important to note that the last login script to execute (usually the user login script) overrides any conflicting commands in a previous login script.


Login Script Conventions

When creating login scripts, you must follow certain conventions. These conventions are as follows :

  • Minimum login script: There is no minimum. You may choose whether to utilize login scripts, and all types of login scripts are optional. Login scripts can vary in length from one line to many lines and can be quite complex. There are no required commands.

  • Case: You can use uppercase or lowercase when writing login scripts. There is one exception to this rule. Identifier variables enclosed in quotation marks and preceded by a percent sign (%) must be uppercase.

  • Characters per line: You can have a maximum of 512 characters per line, including any variables after they are replaced by their values. However, it's probably better to limit line length for readability.

  • Punctuation and symbols: You must type all symbols (#, %, ", _) and punctuation exactly as shown in examples and syntax.

  • Commands per line: You should use one command per line. Start each command on a new line. It is important to note that lines that wrap automatically are considered one command.

  • Sequence of commands: You should enter commands in the order you want them to execute. If you use # (or @) 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 , together to make the login script easier to read.

  • Blank lines: Blank lines don't affect login script execution. You can use them to visually separate groups of commands.

  • Remarks (REMARK, REM, asterisks , and semicolons): As with all scripts, lines beginning with REMARK , REM , an asterisk, or a semicolon are comments, and are not displayed when the login script executes. You can use remarks to record the purpose of each command or group of commands or to temporarily keep certain lines from executing.

  • Identifier variables: Identifier variables allow you to replace the variable with specific information, such as a user's last name or the workstation's operating system. This makes the login script more flexible. When the login script executes, it substitutes real values for the identifier variables. By using the variable, you can make the same login script command applicable to multiple users. More information on identifier variables appears later in this appendix.

  • eDirectory attributes: Any eDirectory attribute value can be read from a login script. This includes extended names. The login utility does not store the Novell names but it takes the attribute name and tries to read it. The syntax for accessing eDirectory attributes is identical to common script variables with the following exceptions:

    • If the name contains a space, you can replace it with an underscore (_).

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

    • If multiple variables are required, such as in required a WRITE statement, they must be in separate strings.

    • You must use the actual eDirectory attribute value names. You cannot use localized names or nicknames.

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

Following these conventions will help you develop well-written login scripts and help you avoid potential difficulties.



Novell NetWare 6. 5 Administrator's Handbook
Novell NetWare 6.5 Administrators Handbook
ISBN: 0789729849
EAN: 2147483647
Year: 2002
Pages: 172

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net