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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access