## Name

LOGIN — Timesharing System Log-In

## Synopsis

`login`

## Description

Login is used in timesharing systems to provide log-in security. It is automatically called by the timesharing monitor tsmon, or can be used after initial log-in to change a terminal's user.

Login requests a user name and password, which is checked against a validation file. If the information is correct, the user's system priority, user ID, and working directories are set up according to information stored in the file, and the initial program specified in the password file is executed (usually shell). If the user cannot supply a correct user name and password after three attempts, the process is aborted. The validation file is called `PASSWORD` and must be present in the directory `/d0/SYS`. The file contains one or more variable-length text records, one for each user name. Each record has the following fields, which are delimited by commas:

1. User name (up to 32 characters, may include spaces). If this field is empty, any name will match.

2. Password (up to 32 characters, may include spaces) If this field is omitted, no password is required by the specific use.

3. User index (ID) number (from 0 to 65535, 0 is superuser). This number is used by the file security system and as the system-wide user ID to identify all processes initiated by the user. The system manager should assign a unique ID to each potential user. (See the section called “The File Security System”)

4. Initial process (CPU time) priority: 1 - 255 (see the section called “Process States”)

5. Pathlist of initial execution directory (usually `/d0/CMDS`)

6. Pathlist of initial data directory (specific user's directory)

7. Name of initial program to execute (usually shell). NOTE: This is not a shell command line.

Here's a sample validation file:

    superuser,secret,0,255,.,.,shell
    steve,open sesame,3,128,.,/d1/STEVE,shell
    sally,qwerty,10,100,/d0/BUSINESS,/d1/LETTERS,wordprocessor
    bob,,4,128,.,/d1/BOB,Basic09

To use the login command, enter:

login

This will cause prompts for the user's name and (optionally) password to be displayed, and if answered correctly, the user is logged into the system. Login initializes the user number, working execution directory, working data directory, and executes the initial program specified by the password file. The date, time and process number (which is not the same as the user ID, see the section called “Creation of New Processes”) are also displayed.

Note: if the shell from which login was called will not be needed again, it may be discarded by using the ex command to start the login command. For example:

ex login

### Logging Off the System

To log off the system, the initial program specified in the password file must be terminated. For most programs (including shell) this may be done by typing an end of file character (escape) as the first character on a line.

### Displaying a “Message-of-the-Day”

If desired, a file named `motd` appearing in the SYS directory will cause login to display it's contents on the user's terminal after successful login. This file is not required for login to operate.

For more information see: tsmon, the section called “Setting Up Timesharing System Procedure Files”, the section called “The File Security System”, the section called “Creation of New Processes”

## Examples

    OS9: login

    OS-9 Level 1 Timesharing System Version 1.2 82/12/04 13:02:22

    User name?: superuser
    Password: secret

    Process #07 logged 81/12/04 13:03:00

    Welcome!