9 authenticate a user and start new session
17 This manual page documents the
19 program distributed with the Heimdal Kerberos 5 implementation, it may
20 differ in important ways from your system version.
24 programs logs users into the system. It is intended to be run by
29 If you are already logged in, but want to change to another user, you
33 A username can be given on the command line, else one will be prompted
36 A password is required to login, unless the
38 option is given (indicating that the calling program has already done
39 proper authentication). With
41 the user will be logged in without further questions.
43 For password authentication Kerberos 5, Kerberos 4 (if compiled in),
44 OTP (if compiled in) and local
45 .No ( Pa /etc/passwd )
46 passwords are supported. OTP will be used if the the user is
47 registered to use it, and
51 When using OTP, a challenge is shown to the user.
56 Which authentication mode to use, the only supported value is
60 Indicates that the user is already authenticated. This happens, for
61 instance, when login is started by telnetd, and the user has proved
62 authentic via Kerberos.
64 Indicates which host the user is logging in from. This is passed from
65 telnetd, and is entered into the login database.
69 to preserve all environment variables. If not given, only the
73 variables are preserved. It could be a security risk to pass random
76 or the user shell, so the calling daemon should make sure it only
82 The process of logging user in proceeds as follows.
84 First a check is made that logins are allowed at all. This usually
87 If it exists, and the user trying to login is not root, the contents
88 is printed, and then login exits.
90 Then various system parameters are set up, like changing the owner of
91 the tty to the user, setting up signals, setting the group list, and
92 user and group id. Also various machine specific tasks are performed.
96 changes to the users home directory, or if that fails, to
98 The environment is setup, by adding some required variables (such as
100 and also authentication related ones (such as
102 If an environment file exists
103 .No ( Pa /etc/environment ) ,
104 variables are set according to
107 If one or more login message files are configured, their contents is
108 printed to the terminal.
110 If a login time command is configured, it is executed. A logout time
111 command can also be configured, which makes
113 fork, and wait for the user shell to exit, and then run the command.
114 This can be used to clean up user credentials.
116 Finally, the user's shell is executed. If the user logging in is root,
117 and root's login shell does not exist, a default shell (usually
119 is also tried before giving up.
121 These environment variables are set by login (not including ones set by
122 .Pa /etc/environment ) :
124 .Bl -tag -compact -width USERXXLOGNAME
126 the default system path
128 the user's home directory (or possibly
130 .It Dv USER , Dv LOGNAME
131 both set to the username
135 set to whatever is passed to
138 if the password is verified via Kerberos 5, this will point to the
139 credentials cache file
141 if the password is verified via Kerberos 4, this will point to the
145 .Bl -tag -compact -width Ds
146 .It Pa /etc/environment
147 Contains a set of environment variables that should be set in addition
148 to the ones above. It should contain sh-style assignments like
150 Note that they are not parsed the way a shell would. No variable
151 expansion is performed, and all strings are literal, and quotation
152 marks should not be used. Everything after a hash mark is considered a
153 comment. The following are all different (the last will set the
158 .Bd -literal -offset indent
160 FOO="this is a string"
161 BAR= FOO='this is a string'
163 .It Pa /etc/login.access
166 .It Pa /etc/login.conf
167 This is a termcap style configuration file, that contains various
172 capability record is used. The possible capability strings include:
174 .Bl -tag -compact -width Ds
176 This is a comma separated list of environment files that are read in
177 the order specified. If this is missing the default
181 This program will be executed just before the user's shell is started.
182 It will be called without arguments.
183 .It Li logout_program
184 This program will be executed just after the user's shell has
185 terminated. It will be called without arguments. This program will be
186 the parent process of the spawned shell.
188 A comma separated list of text files that will be printed to the
189 user's terminal before starting the shell. The string
191 works similarly, but points to a single file.
193 Points to a file containing ulimit settings for various users. Syntax
194 is inspired by what pam_limits uses, and the default is
195 .Pa /etc/security/limits.conf .
198 If it exists, login is denied to all but root. The contents of this
199 file is printed before login exits.
204 programs typically print all sorts of information by default, such as
205 last time you logged in, if you have mail, and system message files.
208 does not, so there is no reason for
210 files or similar. We feel that these tasks are best left to the user's
213 facility allows for a shell independent solution, if that is desired.
217 file could look like:
218 .Bd -literal -offset indent
220 :motd=/etc/motd,/etc/motd.local:\\
221 :limits=/etc/limits.conf:
226 file consists of a table with four whitespace separated fields. First
227 field is a username or a groupname (prefixed with
236 (the last meaning both soft and hard).
237 Third field is a limit name (such as
241 Last field is the limit value (a number or
243 for unlimited). In the case of data sizes, the value is in kilobytes,
244 and cputime is in minutes.
251 This login program was written for the Heimdal Kerberos 5
252 implementation. The login.access code was written by Wietse Venema.