LOGIN(1) LOGIN(1) login - login [-p] [-s shell] [-h host] [-H] [[-f] username|UID] login . , login ' . , , , . , . . login ' . . LOGIN_RETRIES . If password aging has been enabled for the account, the user may be prompted for a new password before proceeding. In such a case, the old password must be provided and the new password entered before continuing. Please refer to passwd(1) for more information. /etc/passwd. , . . , . $HOME, $USER, $SHELL, $PATH, $LOGNAME $MAIL . $PATH /usr/local/bin:/bin:/usr/bin /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin root, . The environment variable $TERM will be preserved, if it exists, else it will be initialized to the terminal type on your tty. The environment variables $COLORTERM and $NO_COLOR will be preserved if they exist. Other environment variables are preserved if the -p option is given or if LOGIN_ENV_SAFELIST defined in /etc/login.defs (see below). , PAM, . Then the user's shell is started. If no shell is specified for the user with -s or in /etc/passwd, then /bin/sh is used. If the specified shell contains a space, it is treated as a shell script. If there is no home directory specified in /etc/passwd, then / is used, followed by .hushlogin check as described below. .hushlogin, <<>> . . , /var/log/lastlog, , . -p getty(8) login , . . LOGIN_ENV_SAFELIST. -f , . , , getty(8) . -h ( telnetd(8)) login, utmp wtmp. . , -h PAM. login, -h, remote. PAM (, /etc/pam.d/login /etc/pam.d/remote). -H (, telnetd(8)) login , login: . . , LOGIN_PLAIN_PROMPT . -s, --shell Specify a shell, other than the one defined in /etc/passwd, to log in to. -h, --help . -V, --version . login /etc/logindefs ( login.defs(5)). , (, shadow-utils). login: MOTD_FILE () <<:>> << >>, . , .motd . /usr/share/misc/motd:/run/motd:/etc/motd. MOTD_FILE , . , PAM pam_motd(8). MOTD_FILE 2.36. , login , pam_motd (. MOTD_FIRSTONLY), . /run/motd.d, . MOTD_FIRSTONLY ( ) login , MOTD_FILE . , . login pam_motd. no (<<>>). LOGIN_ENV_SAFELIST () Forces login to protect the specified environment variables if -p is not used. The string value is a comma-separated list of variable names. For example: "LANG,LC_MESSAGES,LC_COLLATE". The safelist is ignored for the environment variables HOME, SHELL and USER. LOGIN_PLAIN_PROMPT ( ) login, login:. -H. no (<<>>). LOGIN_TIMEOUT () . 60. LOGIN_RETRIES () . 3. LOGIN_KEEP_USERNAME ( ) login , , ' . no (<<>>). FAIL_DELAY () , . 5. TTYPERM () . 0600 0620, tty. . mesg(1). TTYGROUP () TTYGROUP. tty. TTYGROUP , . TTYGROUP , . . mesg(1). HUSHLOGIN_FILE () , . (, /etc/hushlogins), , ' . , . , , . /etc/hushlogins, , ~/.hushlogin. HUSHLOGIN_FILE , . DEFAULT_HOME ( ) , , . yes, (/), . yes. LASTLOG_UID_MAX ( ) , lastlog. , lastlog . LASTLOG_UID_MAX, lastlog . ULONG_MAX. LOG_UNKFAIL_ENAB ( ) , . no. : : . ENV_PATH () , PATH . /usr/local/bin:/bin:/usr/bin ENV_ROOTPATH (), ENV_SUPATH () , PATH . ENV_ROOTPATH. /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin. LOGIN_SHELL_FALLBACK (boolean) If set to yes, login will provide a valid shell from /etc/shells when the shell specified in /etc/passwd is invalid or inaccessible due to administrative errors. This ensures users can still log in. However, it may bypass intended shell restrictions, potentially causing unexpected behavior if the fallback shell differs from the configured one. /var/run/utmp, /var/log/wtmp, /var/log/lastlog, /var/spool/mail/*, /etc/motd, /etc/passwd, /etc/nologin, /etc/pam.d/login, /etc/pam.d/remote, /etc/hushlogins, $HOME/.hushlogin login systemd (. ). login systemd: login.noauth ( ) , login , -f. BSD -r . rlogind(8). , , ; su(1). , , login vhangup(2) - . , . login vhangup(2) , . exec login xterm. BSD login 5.40 (5/9/89), Michael Glad , HP-UX. Linux 0.12: Peter Orbaek . , PAM, Karel Zak . mail(1), passwd(1), passwd(5), utmp(5), environ(7), getty(8), init(8), lastlog(8), shutdown(8) login util-linux, Linux . util-linux 2.42.3 2026-09-02 LOGIN(1)