shadow/man/login.1

154 lines
5.6 KiB
Groff

.\"$Id: login.1,v 1.9 2001/01/25 10:43:50 kloczek Exp $
.\" Copyright 1989 - 1994, Julianne Frances Haugh
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.TH LOGIN 1
.SH NAME
login \- Begin session on the system
.SH SYNOPSIS
\fBlogin\fR [\fB-p\fR] [\fIusername\fR] [\fIENV=VAR ...\fR]
.br
\fBlogin\fR [\fB-p\fR] [\fB-h\fR \fIhost\fR] [\fB-f\fR \fIusername\fR]
.br
\fBlogin\fR [\fB-p\fR] \fB-r\fR \fIhost\fR
.SH DESCRIPTION
.B login
is used to establish a new session with the system.
It is normally invoked automatically by responding to the
.I login:
prompt on the user\'s terminal.
.B login
may be special to the shell and may not be invoked as a sub-process.
Typically,
.B login
is treated by the shell as \fBexec login\fR which causes the user
to exit from the current shell.
Attempting to execute \fBlogin\fR from any shell but the login shell
will produce an error message.
.PP
When invoked from the \fIlogin:\fR prompt, the user may enter
environmental variables after the username.
These variables are entered in the form \fBNAME=VALUE\fR.
Not all variables may be set in the fashion, notably \fBPATH\fR,
\fBHOME\fR and \fBSHELL\fR.
Additionally, \fBIFS\fR may be inhibited if the user\'s login
shell is \fB/bin/sh\fR.
.PP
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
\fBlogin\fR exits and the communications link is severed.
.PP
If password aging has been enabled for your account, you may be
prompted for a new password before proceeding.
You will be forced to provide your old password and the new
password before continuing.
Please refer to \fBpasswd \fR(1) for more information.
.PP
After a successful login,
you will be informed of any system messages and the presence
of mail.
You may turn off the printing of the system message file,
\fI/etc/motd\fR, by creating a zero-length file \fI.hushlogin\fR
in your login directory.
The mail message will be one of "\fBYou have new mail.\fR",
"\fBYou have mail.\fR", or "\fBNo Mail.\fR" according to
the condition of your mailbox.
.PP
Your user and group ID will be set according to their values in
the \fI/etc/passwd\fR file.
The value for \fB$HOME\fR, \fB$SHELL\fR, \fB$PATH\fR, \fB$LOGNAME\fR,
and \fB$MAIL\fR are set according to the appropriate fields in the
password entry.
Ulimit, umask and nice values may also be set according to
entries in the GECOS field.
.PP
On some installations, the environmental variable \fB$TERM\fR will be
initialize to the terminal type on your tty line, as specified in
\fI/etc/ttytype\fR.
.PP
An initialization script for your command interpreter may also be
executed.
Please see the appropriate manual section for more information on
this function.
.PP
A subsystem login is indicated by the presense of a "*" as the first
character of the login shell. The given home directory will be used as
the root of a new filesystem which the user is actually logged into.
.SH OPTIONS
.TP
.B -p
Preserve environment.
.TP
.B -f
Do not perform authentication, user is preauthenticated.
.TP
.B -h
Name of the remote host for this login.
.TP
.B -r
Perform autologin protocol for rlogin.
.PP
The \fB-r -h\fP and \fB-f\fP options are only used when \fBlogin\fP is invoked by root.
.SH CAVEATS
.PP
This version of \fBlogin\fR has many compilation options, only some of which
may be in use at any particular site.
.PP
The location of files is subject to differences in system configuration.
.SH FILES
/etc/utmp \- list of current login sessions
.br
/etc/wtmp \- list of previous login sessions
.br
/etc/passwd \- user account information
.br
/etc/shadow \- encrypted passwords and age information
.br
/etc/motd \- system message file
.br
/etc/nologin \- prevent non-root users from logging in
.br
/etc/ttytype \- list of terminal types
.br
$HOME/.profile \- initialization script for default shell
.br
$HOME/.hushlogin \- suppress printing of system messages
.br
.SH SEE ALSO
.PP
.BR getty (8),
.BR mail (1),
.BR passwd (1),
.BR sh (1),
.BR su (1),
.BR login.defs (5),
.\" .BR d_passwd (5),
.BR passwd (5),
.BR nologin (5)
.SH AUTHOR
Julianne Frances Haugh (jockgrrl@ix.netcom.com)