]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - login-utils/login.1
login: add support for directories in MOTD_FILE=
[thirdparty/util-linux.git] / login-utils / login.1
index 092213d23c6bff515b6ceb0193b9f61e462a3419..1e2d3cb28990c60b080449e31eb111d9deb1feb1 100644 (file)
@@ -6,17 +6,17 @@ login \- begin session on the system
 .SH SYNOPSIS
 .B login
 [
-.BR \-p
+.B \-p
 ] [
-.BR \-h
-.IR host
+.B \-h
+.I host
 ] [
-.BR \-H
+.B \-H
 ] [
-.BR \-f
-.IR username
+.B \-f
+.I username
 |
-.IR username
+.I username
 ]
 .SH DESCRIPTION
 .B login
@@ -24,7 +24,7 @@ is used when signing onto a system.  If no argument is given,
 .B login
 prompts for the username.
 .PP
-The user is then prompted for a password, where approprate.  Echoing
+The user is then prompted for a password, where appropriate.  Echoing
 is disabled to prevent revealing the password.  Only a small number
 of password failures are permitted before
 .B login
@@ -41,7 +41,7 @@ The user and group ID will be set according to their values in the
 .I /etc/passwd
 file.  There is one exception if the user ID is zero: in this case,
 only the primary group ID of the account is set.  This should allow
-the system adminitrator to login even in case of network problems.
+the system administrator to login even in case of network problems.
 The value for
 .BR $HOME ,
 .BR $USER ,
@@ -56,20 +56,20 @@ defaults to
 .I /usr\:/local\:/bin:\:/bin:\:/usr\:/bin
 for normal users, and to
 .I /usr\:/local\:/sbin:\:/usr\:/local\:/bin:\:/sbin:\:/bin:\:/usr\:/sbin:\:/usr\:/bin
-for root if not other configured.
+for root, if not otherwise configured.
 .P
 The environment variable
 .B $TERM
 will be preserved, if it exists (other environment variables are
 preserved if the
 .B \-p
-option is given) or be initialize to the terminal type on your tty.
+option is given), else it will be initialized to the terminal type on your tty.
 .PP
 Then the user's shell is started.  If no shell is specified for the
 user in
-.BR /etc\:/passwd ,
+.IR /etc\:/passwd ,
 then
-.B /bin\:/sh
+.I /bin\:/sh
 is used.  If there is no directory specified in
 .IR /etc\:/passwd ,
 then
@@ -119,7 +119,7 @@ with the
 .B \-h
 option the name is
 .IR remote .
-It is necessary to create a proper PAM config files (e.g.
+It is necessary to create proper PAM config files (e.g.,
 .I /etc\:/pam.d\:/login
 and
 .IR /etc\:/pam.d\:/remote ).
@@ -130,31 +130,53 @@ Used by other servers (i.e.,
 to tell
 .B login
 that printing the hostname should be suppressed in the login: prompt.
+See also LOGIN_PLAIN_PROMPT below if your server does not allow to configure
+.B login
+command line.
+.TP
+\fB\-\-help\fR
+Display help text and exit.
 .TP
-.B \-V
-Print version and exit.
+\fB\-V\fR, \fB\-\-version\fR
+Display version information and exit.
 .SH CONFIG FILE ITEMS
 .B login
 reads the
 .IR /etc\:/login.defs (5)
 configuration file.  Note that the configuration file could be
-distributed with another package (e.g. shadow-utils).  The following
+distributed with another package (e.g., shadow-utils).  The following
 configuration items are relevant for
 .BR login (1):
 .PP
 .B MOTD_FILE
 (string)
 .RS 4
-If defined, ":" delimited list of "message of the day" files to be
-displayed upon login.  The default value is
-.IR /etc\:/motd .
+Sepecifies a ":" delimited list of "message of the day" files and directories
+to be displayed upon login.  If the specified path is a directory then displays
+all files with .motd file extension in version-sort order from the directory.
+.PP
+The default value is
+.IR "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d" .
 If the
 .B MOTD_FILE
-item is empty or quiet login is enabled then the message of the day
+item is empty or a quiet login is enabled, then the message of the day
 is not displayed.  Note that the same functionality is also provided
 by
 .BR pam_motd (8)
 PAM module.
+.PP
+The directories in the
+.B MOTD_FILE
+are supported since version 2.36.
+.RE
+.PP
+.B LOGIN_PLAIN_PROMPT
+(boolean)
+.RS 4
+Tell login that printing the hostname should be suppressed in the login:
+prompt.  This is alternative to the \fB\-H\fR command line option.  The default
+value is
+.IR no .
 .RE
 .PP
 .B LOGIN_TIMEOUT
@@ -167,7 +189,7 @@ Max time in seconds for login.  The default value is
 .B LOGIN_RETRIES
 (number)
 .RS 4
-Maximum number of login retries in case of bad password.  The default
+Maximum number of login retries in case of bad password.  The default
 value is
 .IR 3 .
 .RE
@@ -184,7 +206,10 @@ login failure.  The default value is
 (string)
 .RS 4
 The terminal permissions.  The default value is
-.IR 0600 .
+.I 0600
+or
+.I 0620
+if tty group is used.
 .RE
 .PP
 .B TTYGROUP
@@ -196,7 +221,7 @@ The default value is
 .IR tty .
 If the
 .B TTYGROUP
-does not exist then the ownership of the terminal is set to the
+does not exist, then the ownership of the terminal is set to the
 user\'s primary group.
 .PP
 The
@@ -208,29 +233,29 @@ can be either the name of a group or a numeric group identifier.
 (string)
 .RS 4
 If defined, this file can inhibit all the usual chatter during the
-login sequence.  If a full pathname (e.g.
+login sequence.  If a full pathname (e.g.,
 .IR /etc\:/hushlogins )
 is specified, then hushed mode will be enabled if the user\'s name or
 shell are found in the file.  If this global hush login file is empty
 then the hushed mode will be enabled for all users.
 .PP
-If not a full pathname is specified, then hushed mode will be enabled
+If a full pathname is not specified, then hushed mode will be enabled
 if the file exists in the user\'s home directory.
 .PP
 The default is to check
 .I /etc\:/hushlogins
-and if does not exist then
+and if it does not exist then
 .I ~/.hushlogin
 .PP
 If the
 .B HUSHLOGIN_FILE
-item is empty then all checks are disabled.
+item is empty, then all the checks are disabled.
 .RE
 .PP
 .B DEFAULT_HOME
 (boolean)
 .RS 4
-Indicate if login is allowed if we can not change directory to the
+Indicate if login is allowed if we cannot change directory to the
 home directory.  If set to
 .IR yes ,
 the user will login in the root (/) directory if it is not possible
@@ -238,6 +263,17 @@ to change directory to her home.  The default value is
 .IR yes .
 .RE
 .PP
+.B LASTLOG_UID_MAX
+(unsigned number)
+.RS 4
+Highest user ID number for which the lastlog entries should be
+updated.  As higher user IDs are usually tracked by remote user
+identity and authentication services there is no need to create
+a huge sparse lastlog file for them.  No LASTLOG_UID_MAX option
+present in the configuration means that there is no user ID limit
+for writing lastlog entries.
+.RE
+.PP
 .B LOG_UNKFAIL_ENAB
 (boolean)
 .RS 4
@@ -245,15 +281,15 @@ Enable display of unknown usernames when login failures are recorded.
 The default value is
 .IR no .
 .PP
-Note that logging unknown usernames may be a security issue if an
-user enter her password instead of her login name.
+Note that logging unknown usernames may be a security issue if a
+user enters her password instead of her login name.
 .RE
 .PP
 .B ENV_PATH
 (string)
 .RS 4
 If set, it will be used to define the PATH environment variable when
-a regular user login.  The default value is
+a regular user login.  The default value is
 .I /usr\:/local\:/bin:\:/bin:\:/usr\:/bin
 .RE
 .PP
@@ -264,7 +300,7 @@ a regular user login.  The default value is
 (string)
 .RS 4
 If set, it will be used to define the PATH environment variable when
-the superuser login.  The default value is
+the superuser logs in.  ENV_ROOTPATH takes precedence.  The default value is
 .I /usr\:/local\:/sbin:\:/usr\:/local\:/bin:\:/sbin:\:/bin:\:/usr\:/sbin:\:/usr\:/bin
 .RE
 .SH FILES
@@ -282,12 +318,12 @@ the superuser login.  The default value is
 .I .hushlogin
 .fi
 .SH "SEE ALSO"
-.BR init (8),
-.BR getty (8),
 .BR mail (1),
 .BR passwd (1),
 .BR passwd (5),
 .BR environ (7),
+.BR getty (8),
+.BR init (8),
 .BR shutdown (8)
 .SH BUGS
 The undocumented BSD
@@ -320,15 +356,13 @@ Ported to Linux 0.12:
 Peter Orbaek
 .ME
 .br
-Rewritten to PAM-only version by
+Rewritten to PAM-only version by
 .MT kzak@\:redhat.\:com
 Karel Zak
 .ME
 .SH AVAILABILITY
-The
-.B login
-command is part of the util-linux package and is
+The login command is part of the util-linux package and is
 available from
-.UR ftp:\://ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
+.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
 Linux Kernel Archive
 .UE .