Name

login

Synopsis

                  login [name | option]

Log into the system. login asks for a username (name can be supplied on the command line) and password (if appropriate).

If successful, login updates accounting files, sets various environment variables, notifies users if they have mail, and executes startup shell files.

Only the root user can log in when /etc/nologin exists. That file is displayed before the connection is terminated. Furthermore, root may connect only on a tty that is listed in /etc/securetty. If ~/.hushlogin exists, execute a quiet login. If /var/adm/lastlog exists, print the time of the last login.

Options

-f

Suppress second login authentication.

-h host

Specify name of remote host. Normally used by servers, not humans; may be used only by root.

-p

Preserve previous environment.

Get Linux in a Nutshell, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.