]> granicus.if.org Git - shadow/blob - man/login.1.xml
[svn-upgrade] Integrating new upstream version, shadow (4.0.11)
[shadow] / man / login.1.xml
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 $ -->
6   <refmeta>
7     <refentrytitle>LOGIN</refentrytitle>
8     <manvolnum>1</manvolnum>
9     <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
10   </refmeta>
11   <refnamediv id='name'>
12     <refname>login</refname>
13     <refpurpose>begin session on the system</refpurpose>
14   </refnamediv>
15   <!-- body begins here -->
16   <refsynopsisdiv id='synopsis'>
17     <cmdsynopsis>
18       <command>login</command>
19       <arg choice='opt'>-p </arg>
20       <arg choice='opt'>
21       <replaceable>username</replaceable></arg>
22       <arg choice='opt' rep='repeat'> <replaceable>ENV=VAR</replaceable></arg>
23     </cmdsynopsis>
24     <cmdsynopsis>
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>
29     </cmdsynopsis>
30     <cmdsynopsis>
31       <command>login</command>
32       <arg choice='opt'>-p </arg>
33       <arg choice='plain'>-r <replaceable>host</replaceable></arg>
34     </cmdsynopsis>
35   </refsynopsisdiv>
36   
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&acute;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.
48     </para>
49     
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.
54     </para>
55     
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.
62     </para>
63     
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.
72     </para>
73     
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.
81     </para>
82     
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>.
86     </para>
87     
88     <para>An initialization script for your command interpreter may also be
89       executed. Please see the appropriate manual section for more
90       information on
91       this function.
92     </para>
93     
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
97       logged into.
98     </para>
99
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".
108     </para>
109
110   </refsect1>
111   
112   <refsect1 id='options'>
113     <title>OPTIONS</title>
114     <variablelist remap='IP'>
115       <varlistentry>
116         <term>
117           <option>-f</option>
118         </term>
119         <listitem>
120           <para>Do not perform authentication, user is preauthenticated.
121           </para>
122         </listitem>
123       </varlistentry>
124       <varlistentry>
125         <term>
126           <option>-h</option>
127         </term>
128         <listitem>
129           <para>Name of the remote host for this login.</para>
130         </listitem>
131       </varlistentry>
132       <varlistentry>
133         <term>
134           <option>-p</option>
135         </term>
136         <listitem>
137           <para>Preserve environment.</para>
138         </listitem>
139       </varlistentry>
140       <varlistentry>
141         <term>
142           <option>-r</option>
143         </term>
144         <listitem>
145           <para>Perform autologin protocol for rlogin.</para>
146         </listitem>
147       </varlistentry>
148     </variablelist>
149     
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.
153     </para>
154   </refsect1>
155   
156   <refsect1 id='caveats'>
157     <title>CAVEATS</title>
158     <para>
159       This version of <command>login</command> has many compilation options,
160       only some of which may be in use at any particular site.
161     </para>
162     
163     <para>The location of files is subject to differences in system
164       configuration.
165     </para>
166   </refsect1>
167   
168   <refsect1 id='files'>
169     <title>FILES</title>
170     <variablelist>
171       <varlistentry>
172         <term><filename>/var/run/utmp</filename></term>
173         <listitem>list of current login sessions</listitem>
174       </varlistentry>
175       <varlistentry>
176         <term><filename>/var/log/wtmp</filename></term>
177         <listitem>list of previous login sessions</listitem>
178       </varlistentry>
179       <varlistentry>
180         <term><filename>/etc/passwd</filename></term>
181         <listitem>user account information</listitem>
182       </varlistentry>
183       <varlistentry>
184         <term><filename>/etc/shadow</filename></term>
185         <listitem>secure user account information</listitem>
186       </varlistentry>
187       <varlistentry>
188         <term><filename>/etc/motd</filename></term>
189         <listitem>system message of the day file</listitem>
190       </varlistentry>
191       <varlistentry>
192         <term><filename>/etc/nologin</filename></term>
193         <listitem>prevent non-root users from logging in</listitem>
194       </varlistentry>
195       <varlistentry>
196         <term><filename>/etc/ttytype</filename></term>
197         <listitem>list of terminal types</listitem>
198       </varlistentry>
199       <varlistentry>
200         <term><filename>$HOME/.hushlogin</filename></term>
201         <listitem>suppress printing of system messages</listitem>
202       </varlistentry>
203     </variablelist>
204   </refsect1>
205
206   <refsect1 id='see_also'>
207     <title>SEE ALSO</title>
208     <para><citerefentry>
209         <refentrytitle>mail</refentrytitle><manvolnum>1</manvolnum>
210       </citerefentry>,
211       <citerefentry>
212         <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
213       </citerefentry>,
214       <citerefentry>
215         <refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
216       </citerefentry>,
217       <citerefentry>
218         <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
219       </citerefentry>,
220       <citerefentry>
221         <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
222       </citerefentry>,
223       <citerefentry>
224         <refentrytitle>nologin</refentrytitle><manvolnum>5</manvolnum>
225       </citerefentry>,
226       <citerefentry>
227         <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
228       </citerefentry>,
229       <citerefentry>
230         <refentrytitle>getty</refentrytitle><manvolnum>8</manvolnum>
231       </citerefentry>
232     </para>
233   </refsect1>
234   
235   <refsect1 id='author'>
236     <title>AUTHOR</title>
237     <para>Julianne Frances Haugh &lt;jockgrrl@ix.netcom.com&gt;</para>
238   </refsect1>
239 </refentry>