use the ENDIAN definitions
[unix-history] / usr / src / usr.bin / login / login.1
index 1d10db3..2a69db8 100644 (file)
@@ -2,7 +2,7 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)login.1     6.1 (Berkeley) %G%
+.\"    @(#)login.1     6.4 (Berkeley) %G%
 .\"
 .TH LOGIN 1 ""
 .UC 4
 .\"
 .TH LOGIN 1 ""
 .UC 4
 login \- sign on
 .SH SYNOPSIS
 .B login
 login \- sign on
 .SH SYNOPSIS
 .B login
-[ \-p ] [ username ]
+[
+.B \-p
+] [ username ]
+.br
+.B login
+[
+.B \-p
+] [
+.B \-h
+hostname
+] [
+.B \-f
+] [
+username
+]
 .SH DESCRIPTION
 The
 .I login
 command
 is used when a user initially
 .SH DESCRIPTION
 The
 .I login
 command
 is used when a user initially
-signs on, or it may be used at any time to change
+signs on.
+It may also be used at any time to change
 from one user to another.
 from one user to another.
-The latter case is the one summarized above and
-described here.
-See \*(lqHow to Get Started\*(rq for how to dial up initially.
+This case is the one summarized first above and described here.
+See \*(lqHow to Get Started\*(rq for how to connect initially.
+The invocation of
+.I login
+for initial sign-on
+is made by a system program or server using the latter form of the command
+and is described below.
 .PP
 If
 .I login
 .PP
 If
 .I login
@@ -34,31 +53,32 @@ session.
 After a successful login,
 accounting files are updated and
 the user is informed of the
 After a successful login,
 accounting files are updated and
 the user is informed of the
-existence of mail,
-and
-the message of the day is printed,
-as is the time he last logged in (unless he has a \*(lq.hushlogin\*(rq
-file in his home directory \- this
+existence of mail.
+The message of the day is printed,
+as is the time of his last login.
+Both are suppressed if he has a \*(lq.hushlogin\*(rq
+file in his home directory; this
 is mostly used to make life easier for non-human users, such as
 is mostly used to make life easier for non-human users, such as
-.IR uucp ).
+.IR uucp .
 .PP
 .I Login
 initializes the user and group IDs and the working directory,
 then executes a command interpreter (usually
 .PP
 .I Login
 initializes the user and group IDs and the working directory,
 then executes a command interpreter (usually
-.IR  sh (1))
+.IR  csh (1))
 according to specifications found in a password file.
 according to specifications found in a password file.
-Argument 0 of the command interpreter is \*(lq\-sh\*(rq, or
-more generally the name of the command interpreter with
-a leading dash (\*(lq\-\*(rq) prepended.
+Argument 0 of the command interpreter is
+the name of the command interpreter with
+a leading dash (\*(lq\-\*(rq).
 .PP
 Login also modifies the
 environment
 .IR environ (7)
 with information specifying home directory, command interpreter, terminal
 type (if available) and user name.
 .PP
 Login also modifies the
 environment
 .IR environ (7)
 with information specifying home directory, command interpreter, terminal
 type (if available) and user name.
-The `-p' argument causes the environment to be preserved from getty.
+The `\-p' argument causes the remainder of the environment to be preserved,
+otherwise any previous environment is discarded.
 .PP
 .PP
-If the file /etc/nologin exists
+If the file /etc/nologin exists,
 .I login
 prints its contents on the user's terminal and exits. This is
 used by
 .I login
 prints its contents on the user's terminal and exits. This is
 used by
@@ -70,6 +90,24 @@ Login is recognized by
 and
 .IR csh (1)
 and executed directly (without forking).
 and
 .IR csh (1)
 and executed directly (without forking).
+.PP
+There are several additional options to
+.I login
+for use at initial login.
+With one exception, these options are available only to the superuser.
+The
+.B \-h
+option is used by
+.IR telnetd (8C)
+and other servers to list the host from which
+the connection was received.
+The
+.B \-f
+option is used with a username on the command line
+to indicate that proper authentication has already been done
+and that no password need be requested.
+This option may be used by the superuser
+or by the user specified on the command line.
 .SH FILES
 .ta \w'/usr/spool/mail/*\ \ 'u
 /etc/utmp      accounting
 .SH FILES
 .ta \w'/usr/spool/mail/*\ \ 'u
 /etc/utmp      accounting
@@ -86,8 +124,8 @@ and executed directly (without forking).
 .br
 \&.hushlogin   makes login quieter
 .SH "SEE ALSO"
 .br
 \&.hushlogin   makes login quieter
 .SH "SEE ALSO"
-init(8), getty(8), mail(1), passwd(1), passwd(5), environ(7),
-shutdown(8)
+mail(1), passwd(1), rlogin(1), getpass(3), passwd(5), utmp(5), environ(7),
+init(8), getty(8), shutdown(8),
 .SH DIAGNOSTICS
 \*(lqLogin incorrect,\*(rq
 if the name or the password is bad.
 .SH DIAGNOSTICS
 \*(lqLogin incorrect,\*(rq
 if the name or the password is bad.
@@ -99,7 +137,7 @@ consult a programming counselor.
 An undocumented option,
 .B \-r
 is used by the remote login server,
 An undocumented option,
 .B \-r
 is used by the remote login server,
-.IR rlogind (8C)
+.IR rlogind (8)
 to force
 .I login
 to enter into an initial connection protocol.
 to force
 .I login
 to enter into an initial connection protocol.