]> granicus.if.org Git - shadow/blob - man/shadow.5.xml
* src/faillog.c, src/chage.c, src/newusers.c, src/su.c: The getopt
[shadow] / man / shadow.5.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1989 - 1990, Julianne Frances Haugh
4    Copyright (c) 2007 - 2009, Nicolas François
5    All rights reserved.
6   
7    Redistribution and use in source and binary forms, with or without
8    modification, are permitted provided that the following conditions
9    are met:
10    1. Redistributions of source code must retain the above copyright
11       notice, this list of conditions and the following disclaimer.
12    2. Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in the
14       documentation and/or other materials provided with the distribution.
15    3. The name of the copyright holders or contributors may not be used to
16       endorse or promote products derived from this software without
17       specific prior written permission.
18   
19    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
23    HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 -->
31 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
32   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
33 <!-- SHADOW-CONFIG-HERE -->
34 ]>
35 <refentry id='shadow.5'>
36   <!-- $Id$ -->
37   <refmeta>
38     <refentrytitle>shadow</refentrytitle>
39     <manvolnum>5</manvolnum>
40     <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
41     <refmiscinfo class="source">shadow-utils</refmiscinfo>
42     <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
43   </refmeta>
44   <refnamediv id='name'>
45     <refname>shadow</refname>
46     <refpurpose>shadowed password file</refpurpose>
47   </refnamediv>
48
49   <refsect1 id='description'>
50     <title>DESCRIPTION</title>
51     <para>
52       <filename>shadow</filename> is a file which contains the password
53       information for the system's accounts and optional aging
54       information.
55     </para>
56
57     <para>
58       This file must not be readable by regular users if password security
59       is to be maintained.
60     </para>
61
62     <para>
63       Each line of this file contains 9 fields, separated by colons
64       (<quote>:</quote>), in the following order:
65     </para>
66
67     <variablelist>
68       <varlistentry>
69         <term><emphasis role="bold">login name</emphasis></term>
70         <listitem>
71           <para>
72             It must be a valid account name, which exist on the system.
73           </para>
74         </listitem>
75       </varlistentry>
76       <varlistentry>
77         <term><emphasis role="bold">encrypted password</emphasis></term>
78         <listitem>
79           <para>
80             Refer to <citerefentry><refentrytitle>crypt</refentrytitle>
81             <manvolnum>3</manvolnum></citerefentry> for details on how
82             this string is interpreted.
83           </para>
84           <para>
85             If the password field contains some string that is not a valid
86             result of <citerefentry><refentrytitle>crypt</refentrytitle>
87             <manvolnum>3</manvolnum></citerefentry>, for instance ! or *,
88             the user will not be able to use a unix password to log in
89             (but the user may log in the system by other means).
90           </para>
91           <para>
92             This field may be empty, in which case no passwords are
93             required to authenticate as the specified login name.
94             However, some applications which read the
95             <filename>/etc/shadow</filename> file may decide not to permit
96             any access at all if the password field is empty.
97           </para>
98           <para>
99             A password field which starts with a exclamation mark means
100             that the password is locked.  The remaining characters on the
101             line represent the password field before the password was
102             locked.
103           </para>
104         </listitem>
105       </varlistentry>
106       <varlistentry>
107         <term>
108           <emphasis role="bold">date of last password change</emphasis>
109         </term>
110         <listitem>
111           <para>
112             The date of the last password change, expressed as the number
113             of days since Jan 1, 1970.
114           </para>
115           <para>
116             The value 0 has a special meaning, which is that the user
117             should change her pasword the next time she will log in the
118             system.
119           </para>
120           <para>
121             An empty field means that password aging features are
122             disabled.
123           </para>
124         </listitem>
125       </varlistentry>
126       <varlistentry>
127         <term><emphasis role="bold">minimum password age</emphasis></term>
128         <listitem>
129           <para>
130             The minimum password age is the number of days the user will
131             have to wait before she will be allowed to change her password
132             again.
133           </para>
134           <para>
135             An empty field and value 0 mean that there are no minimum
136             password age.
137           </para>
138         </listitem>
139       </varlistentry>
140       <varlistentry>
141         <term><emphasis role="bold">maximum password age</emphasis></term>
142         <listitem>
143           <para>
144             The maximum password age is the number of days after which the
145             user will have to change her password.
146           </para>
147           <para>
148             After this number of days is elapsed, the password may still
149             be valid.  The user should be asked to change her password the
150             next time she will log in.
151           </para>
152           <para>
153             An empty field means that there are no maximum password age,
154             no password warning period, and no password inactivity period
155             (see below).
156           </para>
157           <para>
158             If the maximum password age is lower than the minimum password
159             age, the user cannot change her password.
160           </para>
161         </listitem>
162       </varlistentry>
163       <varlistentry>
164         <term>
165           <emphasis role="bold">password warning period</emphasis>
166         </term>
167         <listitem>
168           <para>
169             The number of days before a password is going to expire (see
170             the maximum password age above) during which the user should
171             be warned.
172           </para>
173           <para>
174             An empty field and value 0 mean that there are no password
175             warning period.
176           </para>
177         </listitem>
178       </varlistentry>
179       <varlistentry>
180         <term>
181           <emphasis role="bold">password inactivity period</emphasis>
182         </term>
183         <listitem>
184           <para>
185             The number of days after a password has expired (see the
186             maximum password age above) during which the password should
187             still be accepted (and the user should update her password
188             during the next login).
189           </para>
190           <para>
191             After expiration of the password and this expiration period is
192             elapsed, no login is possible using the current user's
193             password.  The user should contact her administrator.
194           </para>
195           <para>
196             An empty field means that there are no enforcement of an
197             inactivity period.
198           </para>
199         </listitem>
200       </varlistentry>
201       <varlistentry>
202         <term>
203           <emphasis role="bold">account expiration date</emphasis>
204         </term>
205         <listitem>
206           <para>
207             The date of expiration of the account, expressed as the number
208             of days since Jan 1, 1970.
209           </para>
210           <para>
211             Note that an account expiration differs from a password
212             expiration.  In case of an acount expiration, the user shall
213             not be allowed to login.  In case of a password expiration,
214             the user is not allowed to login using her password.
215           </para>
216           <para>
217             An empty field means that the account will never expire.
218           </para>
219           <para>
220             The value 0 should not be used as it is interpreted as either
221             an account with no expiration, or as an expiration on Jan 1,
222             1970.
223           </para>
224         </listitem>
225       </varlistentry>
226       <varlistentry>
227         <term><emphasis role="bold">reserved field</emphasis></term>
228         <listitem>
229           <para>This field is reserved for future use.</para>
230         </listitem>
231       </varlistentry>
232     </variablelist>
233   </refsect1>
234
235   <refsect1 id='files'>
236     <title>FILES</title>
237     <variablelist>
238       <varlistentry>
239         <term><filename>/etc/passwd</filename></term>
240         <listitem>
241           <para>User account information.</para>
242         </listitem>
243       </varlistentry>
244       <varlistentry>
245         <term><filename>/etc/shadow</filename></term>
246         <listitem>
247           <para>Secure user account information.</para>
248         </listitem>
249       </varlistentry>
250       <varlistentry>
251         <term><filename>/etc/shadow-</filename></term>
252         <listitem>
253           <para>Backup file for /etc/shadow.</para>
254           <para>
255             Note that this file is used by the tools of the shadow
256             toolsuite, but not by all user and password management tools.
257           </para>
258         </listitem>
259       </varlistentry>
260     </variablelist>
261   </refsect1>
262
263   <refsect1 id='see_also'>
264     <title>SEE ALSO</title>
265     <para>
266       <citerefentry>
267         <refentrytitle>chage</refentrytitle><manvolnum>1</manvolnum>
268       </citerefentry>,
269       <citerefentry>
270         <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
271       </citerefentry>,
272       <citerefentry>
273         <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
274       </citerefentry>,
275       <citerefentry>
276         <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
277       </citerefentry>,
278       <citerefentry>
279         <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
280       </citerefentry>,
281       <citerefentry>
282         <refentrytitle>pwconv</refentrytitle><manvolnum>8</manvolnum>
283       </citerefentry>,
284       <citerefentry>
285         <refentrytitle>pwunconv</refentrytitle><manvolnum>8</manvolnum>
286       </citerefentry>,
287       <citerefentry>
288         <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
289       </citerefentry>,
290       <citerefentry>
291         <refentrytitle>sulogin</refentrytitle><manvolnum>8</manvolnum>
292       </citerefentry>.
293     </para>
294   </refsect1>
295 </refentry>