1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" May be distributed under the GNU General Public License
3 .TH LOGIN "1" "June 2012" "util-linux" "User Commands"
5 login \- begin session on the system
23 is used when signing onto a system. If no argument is given,
25 prompts for the username.
27 The user is then prompted for a password, where appropriate. Echoing
28 is disabled to prevent revealing the password. Only a small number
29 of password failures are permitted before
31 exits and the communications link is severed.
33 If password aging has been enabled for the account, the user may be
34 prompted for a new password before proceeding. He will be forced to
35 provide his old password and the new password before continuing.
40 The user and group ID will be set according to their values in the
42 file. There is one exception if the user ID is zero: in this case,
43 only the primary group ID of the account is set. This should allow
44 the system administrator to login even in case of network problems.
53 are set according to the appropriate fields in the password entry.
56 .I /usr\:/local\:/bin:\:/bin:\:/usr\:/bin
57 for normal users, and to
58 .I /usr\:/local\:/sbin:\:/usr\:/local\:/bin:\:/sbin:\:/bin:\:/usr\:/sbin:\:/usr\:/bin
59 for root, if not otherwise configured.
61 The environment variable
63 will be preserved, if it exists (other environment variables are
66 option is given), else it will be initialized to the terminal type on your tty.
68 Then the user's shell is started. If no shell is specified for the
73 is used. If there is no directory specified in
77 is used (the home directory is checked for the
79 file described below).
83 exists, then a "quiet" login is performed (this disables the checking
84 of mail and the printing of the last login time and message of the
86 .I /var\:/log\:/lastlog
87 exists, the last login time is printed (and the current login is
96 not to destroy the environment.
99 Used to skip a second login authentication. This specifically does
101 work for root, and does not appear to work well under Linux.
104 Used by other servers (i.e.,
106 to pass the name of the remote host to
108 so that it may be placed in utmp and wtmp. Only the superuser may
113 option has impact on the
116 The standard service name is
122 It is necessary to create proper PAM config files (e.g.
123 .I /etc\:/pam.d\:/login
125 .IR /etc\:/pam.d\:/remote ).
128 Used by other servers (i.e.,
132 that printing the hostname should be suppressed in the login: prompt.
135 Display version information and exit.
136 .SH CONFIG FILE ITEMS
139 .IR /etc\:/login.defs (5)
140 configuration file. Note that the configuration file could be
141 distributed with another package (e.g. shadow-utils). The following
142 configuration items are relevant for
148 If defined, a ":" delimited list of "message of the day" files to be
149 displayed upon login. The default value is
153 item is empty or a quiet login is enabled, then the message of the day
154 is not displayed. Note that the same functionality is also provided
163 Max time in seconds for login. The default value is
170 Maximum number of login retries in case of a bad password. The default
178 Delay in seconds before being allowed another three tries after a
179 login failure. The default value is
186 The terminal permissions. The default value is
190 if tty group is used.
196 The login tty will be owned by the
202 does not exist, then the ownership of the terminal is set to the
203 user\'s primary group.
207 can be either the name of a group or a numeric group identifier.
213 If defined, this file can inhibit all the usual chatter during the
214 login sequence. If a full pathname (e.g.
215 .IR /etc\:/hushlogins )
216 is specified, then hushed mode will be enabled if the user\'s name or
217 shell are found in the file. If this global hush login file is empty
218 then the hushed mode will be enabled for all users.
220 If a full pathname is not specified, then hushed mode will be enabled
221 if the file exists in the user\'s home directory.
223 The default is to check
225 and if it does not exist then
230 item is empty, then all the checks are disabled.
236 Indicate if login is allowed if we cannot change directory to the
237 home directory. If set to
239 the user will login in the root (/) directory if it is not possible
240 to change directory to her home. The default value is
247 Enable display of unknown usernames when login failures are recorded.
251 Note that logging unknown usernames may be a security issue if a
252 user enters her password instead of her login name.
258 If set, it will be used to define the PATH environment variable when
259 a regular user logs in. The default value is
260 .I /usr\:/local\:/bin:\:/bin:\:/usr\:/bin
269 If set, it will be used to define the PATH environment variable when
270 the superuser logs in. The default value is
271 .I /usr\:/local\:/sbin:\:/usr\:/local\:/bin:\:/sbin:\:/bin:\:/usr\:/sbin:\:/usr\:/bin
298 option is not supported. This may be required by some
302 A recursive login, as used to be possible in the good old days, no
303 longer works; for most purposes
305 is a satisfactory substitute. Indeed, for security reasons, login
306 does a vhangup() system call to remove any possible listening
307 processes on the tty. This is to avoid password sniffing. If one
310 then the surrounding shell gets killed by vhangup() because it's no
311 longer the true owner of the tty. This can be avoided by using
313 in a top-level shell or xterm.
315 Derived from BSD login 5.40 (5/9/89) by
316 .MT glad@\:daimi.\:dk
321 Ported to Linux 0.12:
322 .MT poe@\:daimi.\:aau.\:dk
326 Rewritten to a PAM-only version by
327 .MT kzak@\:redhat.\:com
331 The login command is part of the util-linux package and is
333 .UR ftp:\://ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/