1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
4 <refentry id='login.1'>
5 <!-- $Id: login.1.xml,v 1.10 2005/07/10 20:10:09 kloczek Exp $ -->
7 <refentrytitle>LOGIN</refentrytitle>
8 <manvolnum>1</manvolnum>
9 <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
11 <refnamediv id='name'>
12 <refname>login</refname>
13 <refpurpose>begin session on the system</refpurpose>
15 <!-- body begins here -->
16 <refsynopsisdiv id='synopsis'>
18 <command>login</command>
19 <arg choice='opt'>-p </arg>
21 <replaceable>username</replaceable></arg>
22 <arg choice='opt' rep='repeat'> <replaceable>ENV=VAR</replaceable></arg>
25 <command>login</command>
26 <arg choice='opt'>-p </arg>
27 <arg choice='opt'>-h <replaceable>host</replaceable></arg>
28 <arg choice='opt'>-f <replaceable>username</replaceable></arg>
31 <command>login</command>
32 <arg choice='opt'>-p </arg>
33 <arg choice='plain'>-r <replaceable>host</replaceable></arg>
37 <refsect1 id='description'>
38 <title>DESCRIPTION</title>
39 <para><command>login</command> is used to establish a new session with the
40 system. It is normally invoked automatically by responding to the
41 <emphasis remap='I'>login:</emphasis> prompt on the user´s
42 terminal. <command>login</command> may be special to the shell and may
43 not be invoked as a sub-process. Typically, <command>login</command>
44 is treated by the shell as <emphasis remap='B'>exec login</emphasis>
45 which causes the user to exit from the current shell. Attempting to
46 execute <command>login</command> from any shell but the login shell
47 will produce an error message.
50 <para>The user is then prompted for a password, where appropriate.
51 Echoing is disabled to prevent revealing the password. Only a small
52 number of password failures are permitted before
53 <command>login</command> exits and the communications link is severed.
56 <para>If password aging has been enabled for your account, you may be
57 prompted for a new password before proceeding. You will be forced to
58 provide your old password and the new password before continuing.
59 Please refer to <citerefentry>
60 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
61 </citerefentry> for more information.
64 <para>After a successful login, you will be informed of any system
65 messages and the presence of mail. You may turn off the printing of
66 the system message file, <filename>/etc/motd</filename>, by creating a
67 zero-length file <markup>.hushlogin</markup> in your login directory.
68 The mail message will be one of "<emphasis remap='B'>You have new
69 mail.</emphasis> ", "<emphasis remap='B'>You have mail.</emphasis>",
70 or "<emphasis remap='B'>No Mail.</emphasis> "according to the
71 condition of your mailbox.
74 <para>Your user and group ID will be set according to their values in
75 the <filename>/etc/passwd</filename> file. The value for <emphasis
76 remap='B'>$HOME</emphasis>, <emphasis remap='B'>$SHELL</emphasis>,
77 <emphasis remap='B'>$PATH</emphasis>, <emphasis remap='B'>$LOGNAME</emphasis>,
78 and <emphasis remap='B'>$MAIL</emphasis> are set according to the
79 appropriate fields in the password entry. Ulimit, umask and nice
80 values may also be set according to entries in the GECOS field.
83 <para>On some installations, the environmental variable <emphasis
84 remap='B'>$TERM</emphasis> will be initialized to the terminal type on
85 your tty line, as specified in <filename>/etc/ttytype</filename>.
88 <para>An initialization script for your command interpreter may also be
89 executed. Please see the appropriate manual section for more
94 <para>A subsystem login is indicated by the presence of a "*" as the
95 first character of the login shell. The given home directory will be
96 used as the root of a new file system which the user is actually
100 <para>The <command>login</command> program is NOT responsible for
101 removing users from the utmp file. It is the responsibility of
102 <refentrytitle>getty</refentrytitle><manvolnum>8</manvolnum> and
103 <refentrytitle>init</refentrytitle><manvolnum>8</manvolnum> to clean
104 up apparent ownership of a terminal session. If you use
105 <command>login</command> from the shell prompt without
106 <command>exec</command>, the user you use will continue to appear to
107 be logged in even after you log out of the "subsession".
112 <refsect1 id='options'>
113 <title>OPTIONS</title>
114 <variablelist remap='IP'>
120 <para>Do not perform authentication, user is preauthenticated.
129 <para>Name of the remote host for this login.</para>
137 <para>Preserve environment.</para>
145 <para>Perform autologin protocol for rlogin.</para>
150 <para>The <option>-r</option>, <option>-h</option> and
151 <option>-f</option> options are only used when
152 <command>login</command> is invoked by root.
156 <refsect1 id='caveats'>
157 <title>CAVEATS</title>
159 This version of <command>login</command> has many compilation options,
160 only some of which may be in use at any particular site.
163 <para>The location of files is subject to differences in system
168 <refsect1 id='files'>
172 <term><filename>/var/run/utmp</filename></term>
173 <listitem>list of current login sessions</listitem>
176 <term><filename>/var/log/wtmp</filename></term>
177 <listitem>list of previous login sessions</listitem>
180 <term><filename>/etc/passwd</filename></term>
181 <listitem>user account information</listitem>
184 <term><filename>/etc/shadow</filename></term>
185 <listitem>secure user account information</listitem>
188 <term><filename>/etc/motd</filename></term>
189 <listitem>system message of the day file</listitem>
192 <term><filename>/etc/nologin</filename></term>
193 <listitem>prevent non-root users from logging in</listitem>
196 <term><filename>/etc/ttytype</filename></term>
197 <listitem>list of terminal types</listitem>
200 <term><filename>$HOME/.hushlogin</filename></term>
201 <listitem>suppress printing of system messages</listitem>
206 <refsect1 id='see_also'>
207 <title>SEE ALSO</title>
209 <refentrytitle>mail</refentrytitle><manvolnum>1</manvolnum>
212 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
215 <refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
218 <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
221 <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
224 <refentrytitle>nologin</refentrytitle><manvolnum>5</manvolnum>
227 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
230 <refentrytitle>getty</refentrytitle><manvolnum>8</manvolnum>
235 <refsect1 id='author'>
236 <title>AUTHOR</title>
237 <para>Julianne Frances Haugh <jockgrrl@ix.netcom.com></para>