Novell is now a part of Micro Focus

NetWare 3 Login Script Fundamentals

Articles and Tips: tip

Edward Liebing
Senior Research Engineer
Novell, Inc.

01 Jul 1996

A login script contains a series of commands that are automatically executed in sequence when a user logs in to a NetWare file server. In many ways a login script is similar to a batch file in DOS, but with a different command set.

NetWare 3.1x offers three types of login scripts:

  1. The default login script

  2. The system login script

  3. The user login script

Default Login Script

When NetWare is first installed on a file server, two users are automatically created: SUPERVISOR and GUEST.

The first time you log in as SUPERVISOR to create the other user accounts, NetWare's default login script runs because no other login scripts have been created yet. The default login script for NetWare 3.12 is as follows:



REM Set 1st drive to most appropriate directory








This default login script is designed to give users the bare essentials to work with. Essentially, it maps a search drive to SYS:PUBLIC so you can run the NetWare utilities located there, and a search drive to the appropriate DOS directory if one exists. For user SUPERVISOR, it maps a search drive to SYS:SYSTEM as well so you can access the administrative utilities in that directory. For users other than SUPERVISOR, the default login script also attempts to map the first regular drive to a directory that matches the login name (such as SYS:ELIEBING).

System Login Script

Normally, you create a system login script to set up global NetWare drive mappings and other environmental variables that apply for all users. The system login script runs first, before any user login scripts. Or you can have the system login script exit directly to a menu system and bypass user login scripts altogether.

Once created, the system login script is saved in a DOS text file called NET$LOG.DAT located in the SYS:PUBLIC directory. It can be edited through the NetWare SYSCON utility (or with any text editor), as will be explained later in this chapter.

User Login Scripts

You create a user login script for each user to handle any drive mappings or other setup procedures that apply to individual users. The user login script runs after the system login script, if there is one.

A user can have a separate login script on every file server he or she normally uses. However, only the user login script on the default file server is run. The default server is the one the user logs in to using the LOGIN command. When a user attaches to a server with the ATTACH command, no login script is run, even if one exists for that user on that server. User login scripts are edited through the SYSCON utility (or with any text editor). Once created, a user login script is saved to a text file called LOGIN located in that users' mail subdirectory. NetWare creates a subdirectory for each user under the SYS:MAIL directory. For example, user ED has a mail subdirectory called 17000001 on server LNA312 that holds the LOGIN file. The name of the mail subdirectory matches the User ID number that you can see in the SYSCON utility under the "Other Information" option after you select the user's name.

If you don't create a system login script or a login script for each user, the default login script continues to execute for that user. If you don't want users to run any commands from their personal login scripts, you can place the EXIT command at the very end of the system login script. If you want users to have personal login scripts but you don't want them to be affected by the default login script, create a personal login script that consists of only a space character and save this login script. The fact that a personal login script exists (even though it does nothing) prevents the default login script from running.

Also, to prevent the default login script from running if there is a system login script but no user login scripts, NetWare 3.12 has an undocumented NO_DEFAULT command you can place in the system login script. This prevents the default login script from running.

From Chapter 2, "Tips for Managing Login Scripts," in Beyond the Basics: Maintaining and Optimizing NetWare 3 Servers(ISBN # 0-9645751-0-8).

* Originally published in Novell AppNotes


The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates