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 help text and exit.
137 \fB\-V\fR, \fB\-\-version\fR
138 Display version information and exit.
139 .SH CONFIG FILE ITEMS
142 .IR /etc\:/login.defs (5)
143 configuration file. Note that the configuration file could be
144 distributed with another package (e.g. shadow-utils). The following
145 configuration items are relevant for
151 If defined, a ":" delimited list of "message of the day" files to be
152 displayed upon login. The default value is
156 item is empty or a quiet login is enabled, then the message of the day
157 is not displayed. Note that the same functionality is also provided
166 Max time in seconds for login. The default value is
173 Maximum number of login retries in case of a bad password. The default
181 Delay in seconds before being allowed another three tries after a
182 login failure. The default value is
189 The terminal permissions. The default value is
193 if tty group is used.
199 The login tty will be owned by the
205 does not exist, then the ownership of the terminal is set to the
206 user\'s primary group.
210 can be either the name of a group or a numeric group identifier.
216 If defined, this file can inhibit all the usual chatter during the
217 login sequence. If a full pathname (e.g.
218 .IR /etc\:/hushlogins )
219 is specified, then hushed mode will be enabled if the user\'s name or
220 shell are found in the file. If this global hush login file is empty
221 then the hushed mode will be enabled for all users.
223 If a full pathname is not specified, then hushed mode will be enabled
224 if the file exists in the user\'s home directory.
226 The default is to check
228 and if it does not exist then
233 item is empty, then all the checks are disabled.
239 Indicate if login is allowed if we cannot change directory to the
240 home directory. If set to
242 the user will login in the root (/) directory if it is not possible
243 to change directory to her home. The default value is
250 Enable display of unknown usernames when login failures are recorded.
254 Note that logging unknown usernames may be a security issue if a
255 user enters her password instead of her login name.
261 If set, it will be used to define the PATH environment variable when
262 a regular user logs in. The default value is
263 .I /usr\:/local\:/bin:\:/bin:\:/usr\:/bin
272 If set, it will be used to define the PATH environment variable when
273 the superuser logs in. The default value is
274 .I /usr\:/local\:/sbin:\:/usr\:/local\:/bin:\:/sbin:\:/bin:\:/usr\:/sbin:\:/usr\:/bin
301 option is not supported. This may be required by some
305 A recursive login, as used to be possible in the good old days, no
306 longer works; for most purposes
308 is a satisfactory substitute. Indeed, for security reasons, login
309 does a vhangup() system call to remove any possible listening
310 processes on the tty. This is to avoid password sniffing. If one
313 then the surrounding shell gets killed by vhangup() because it's no
314 longer the true owner of the tty. This can be avoided by using
316 in a top-level shell or xterm.
318 Derived from BSD login 5.40 (5/9/89) by
319 .MT glad@\:daimi.\:dk
324 Ported to Linux 0.12:
325 .MT poe@\:daimi.\:aau.\:dk
329 Rewritten to a PAM-only version by
330 .MT kzak@\:redhat.\:com
334 The login command is part of the util-linux package and is
336 .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/