Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

init(8)

getty(8)

mail(1)

passwd(1)

passwd(5)

environ(5V)

shutdown(8)

utmp(5)

LOGIN(1)  —  USER COMMANDS

NAME

login − sign on

SYNOPSIS

login [ username ]

DESCRIPTION

login signs username on to the system initially; login may also be used at any time to change from one userid to another. 

When used with no argument, login requests a user name and password (if appropriate).  Echoing is turned off (if possible) while typing the password. 

When successful, login updates accounting files, informs you of the existence of any mail, prints the message of the day, and displays the time you last logged in (unless you have a .hushlogin file in your home directory — mainly used by nonhuman users, such as uucp).

login initializes the user and group IDs and the working directory, then starts a command interpreter shell (usually either /bin/sh or /bin/csh according to specifications found in the file /etc/passwd. (Argument 0 of the command interpreter is “−sh”, or more generally, the name of the command interpreter with a leading dash (“−”) prepended.)

login also initializes the environment with information specifying home directory, command interpreter, terminal-type (if available) and username. 

If the file /etc/nologin exists, login prints its contents on the user’s terminal and exits. This is used by shutdown(8) to stop logins when the system is about to go down.

The login command, recognized by sh and csh, is executed directly (without forking), and terminates that shell. To resume working, you must log in.

login times out and exits if its prompt for input is not answered within a reasonable time. 

When the Bourne shell (sh) starts up, it reads a file called .profile from your home directory (that of the username you use to log in).  When the C-Shell (csh) starts up, it reads a file called .cshrc from your home directory, and then reads a file called .login. 

The shells read these files only if they are owned by the person logging in. 

FILES

/etc/utmp accounting
/usr/adm/wtmp accounting
/usr/adm/lastlog time of last login
/usr/ttytype terminal types
/usr/ucb/quota quota check
/usr/spool/mail/∗ mail
/etc/motd message-of-the-day
/etc/passwd password file
/etc/nologin stop login, print message
~/.hushlogin makes login quieter

SEE ALSO

init(8), getty(8), mail(1), passwd(1), passwd(5), environ(5V), shutdown(8), utmp(5)

DIAGNOSTICS

“Login incorrect,” if the name or the password is bad (or mistyped). 
“No Shell”, “cannot open password file”, “no directory”: ask your system administrator for assistance.

Sun Release 3.2  —  Last change: 12 June 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026