Modifying Login Command Procedures to Customize
User Environments
In addition to modifying site-specific startup command procedures,
you can add commands to login command procedures to
perform operations each time a user logs in.
Note that although the examples in this section are for DCL
(.COM) command procedures, you can substitute other file types to
denote other interfaces such as POSIX.
Command Procedure
Description
SYS$MANAGER:SYLOGIN.COM
A file to which you can
add common commands to execute whenever any user logs in. If SYS$MANAGER:SYLOGIN.COM
exists and the logical name SYS$SYLOGIN points to this file, SYLOGIN.COM automatically
executes when any user logs in.
SYS$LOGIN:LOGIN.COM
A file to which you or users can add
commands that are to be executed only when individual users log
in to their accounts. If a file named LOGIN.COM exists in a user's
SYS$LOGIN directory, it automatically executes when the user logs
in.
If you introduce an error in login procedures, you
can accidentally lock yourself out of the system.
Booting Without Startup and Login Procedures describes a boot procedure
you can use in such an emergency.
As system manager, you create and maintain SYLOGIN.COM. This
file is supplied on your distribution kit as a template, and contains
commands that you can modify and add to as the needs of your site
dictate.
The
template for SYSTARTUP_VMS.COM includes the following command line
that assigns the logical name SYS$SYLOGIN to SYLOGIN.COM:
If SYLOGIN.COM exits with an error, the user's login
command procedure is not executed. If this occurs while the user
is logging in to a captive account, the process is terminated because the
system environment might not have been set up properly.
If you expect SYLOGIN.COM to cause an error, you must use
either SET NOON or ON ERROR commands, and explicitly exit the command
procedure with a successful status so that the user's login command
procedure can be executed.
Each user creates and maintains a personal copy of the login
command procedure LOGIN.COM. This file must be in the top-level
directory for the user's account. You might need to help users set
up a personal copy of LOGIN.COM.