When a user logs in, the LOGIN utility executes the appropriate login scripts. Four types of login scripts are available, and they can be used separately or together to tailor a custom environment for your users. All four types of login scripts are optional.
NOTE: A container login script replaces the system login script from NetWare 3TM.
A user can be assigned only one profile login script, but can specify other profile login scripts on the command line. Several users can use the same profile login script.
A user can have only one user login script.
The default login script is executed for all users (including user ADMIN) unless you create a user login script. The default login script contains only essential commands such as drive mappings to the NetWare utilities. (To see the commands in the default login script, see Default Login Script.)
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.
To use the login script from an Organization, Organizational Unit, or Profile object, users must have the Browse right to the object and the Read right to the object's Login Script property.
NOTE: For more information on Browse or Read rights for a file, object, or property, see Browsing and Rights in Concepts.
Maintaining many user login scripts can be time consuming. Therefore, you should try to include as much customizing 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 there are several users with identical login script needs.
Finally, in user login scripts, include only those individual items that can't be included in profile or container login scripts.
Since up to three login scripts can execute whenever a user logs in, conflicts can occur. If this happens, the last login script to execute (usually the user login script) overrides any conflicting commands in a previous login script.
Login scripts are properties of objects. Table 14 shows which objects can contain which login scripts.
Table 14. Objects That Contain Login Scripts
| Object | Type of Login Script |
|---|---|
Organization |
Container |
Organizational Unit |
Container |
Profile |
Profile |
User |
User |
Figure 5 shows where the different types of login scripts can reside in a Directory tree.
Figure 5
Where Login Scripts Are Located
In the previous figure, there are three users, ESAYERS, SWILLIAMS, and MRICHARD. The following table shows which login scripts execute when each of these users logs in.
Container login scripts only affect users in the Organization or Organizational Unit that contains the login script.
For example, in Figure 5, although there are two levels of container objects above users ESAYERS and SWILLIAMS, only the container login script they're in (OU=SALES_PV) executes when they log in.
If the SALES_PV Organizational Unit had no container login script defined, no container login script would execute for ESAYERS and SWILLIAMS, even though a container login script exists at a higher level.
Because user SWILLIAMS has no user login script defined, the default login script executes after the container login script.
Since user MRICHARD belongs to the profile CLERKS, the CLERKS profile login script executes before MRICHARD's user login script. Users can be assigned to only one Profile object, but other profile login scripts can be specified at the command line. For example,
LOGIN username /p profile_object
You can, however, assign users to more than one Group object. Then use the MEMBER OF group identifier variable to specify that different parts of a login script execute, depending on the Group objects that the user belongs to.
For more information about using the MEMBER OF group identifier variable in login scripts, see IF...THEN and Identifier Variables.
When you use INSTALL.NLM to upgrade a previous version of NetWare to NetWare 4TM, the login scripts in the former login directory are automatically added to the Directory database as properties of their respective objects.216
In most cases, these earlier login scripts are compatible with NetWare 4 running Novell® Directory ServicesTM. However, we recommend you review all your login scripts to see if they should be updated to take advantage of NetWare 4 functionality.
If you use a previous version of the NetWare MENU utility to execute a menu program from within a login script, see Converting Old Menu Files for instructions on updating the menu program.
After you convert the menu, change the command in the login script from #MENU menu_name to #NMENU menu_name.