Initial commit for Tizen
[profile/extras/shadow-utils.git] / 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 <refentry id='shadow.5'>
32   <!-- $Id: shadow.5.xml 3017 2009-06-06 11:21:15Z nekral-guest $ -->
33   <refmeta>
34     <refentrytitle>shadow</refentrytitle>
35     <manvolnum>5</manvolnum>
36     <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
37   </refmeta>
38   <refnamediv id='name'>
39     <refname>shadow</refname>
40     <refpurpose>shadowed password file</refpurpose>
41   </refnamediv>
42
43   <refsect1 id='description'>
44     <title>DESCRIPTION</title>
45     <para>
46       <filename>shadow</filename> is a file which contains the password
47       information for the system's accounts and optional aging
48       information.
49     </para>
50
51     <para>
52       This file must not be readable by regular users if password security
53       is to be maintained.
54     </para>
55
56     <para>
57       Each line of this file contains 9 fields, separated by colons
58       (<quote>:</quote>), in the following order:
59     </para>
60
61     <variablelist>
62       <varlistentry>
63         <term><emphasis role="bold">login name</emphasis></term>
64         <listitem>
65           <para>
66             It must be a valid account name, which exist on the system.
67           </para>
68         </listitem>
69       </varlistentry>
70       <varlistentry>
71         <term><emphasis role="bold">encrypted password</emphasis></term>
72         <listitem>
73           <para>
74             Refer to <citerefentry><refentrytitle>crypt</refentrytitle>
75             <manvolnum>3</manvolnum></citerefentry> for details on how
76             this string is interpreted.
77           </para>
78           <para>
79             If the password field contains some string that is not a valid
80             result of <citerefentry><refentrytitle>crypt</refentrytitle>
81             <manvolnum>3</manvolnum></citerefentry>, for instance ! or *,
82             the user will not be able to use a unix password to log in
83             (but the user may log in the system by other means).
84           </para>
85           <para>
86             This field may be empty, in which case no passwords are
87             required to authenticate as the specified login name.
88             However, some applications which read the
89             <filename>/etc/shadow</filename> file may decide not to permit
90             any access at all if the password field is empty.
91           </para>
92           <para>
93             A password field which starts with a exclamation mark means
94             that the password is locked.  The remaining characters on the
95             line represent the password field before the password was
96             locked.
97           </para>
98         </listitem>
99       </varlistentry>
100       <varlistentry>
101         <term>
102           <emphasis role="bold">date of last password change</emphasis>
103         </term>
104         <listitem>
105           <para>
106             The date of the last password change, expressed as the number
107             of days since Jan 1, 1970.
108           </para>
109           <para>
110             The value 0 has a special meaning, which is that the user
111             should change her pasword the next time she will log in the
112             system.
113           </para>
114           <para>
115             An empty field means that password aging features are
116             disabled.
117           </para>
118         </listitem>
119       </varlistentry>
120       <varlistentry>
121         <term><emphasis role="bold">minimum password age</emphasis></term>
122         <listitem>
123           <para>
124             The minimum password age is the number of days the user will
125             have to wait before she will be allowed to change her password
126             again.
127           </para>
128           <para>
129             An empty field and value 0 mean that there are no minimum
130             password age.
131           </para>
132         </listitem>
133       </varlistentry>
134       <varlistentry>
135         <term><emphasis role="bold">maximum password age</emphasis></term>
136         <listitem>
137           <para>
138             The maximum password age is the number of days after which the
139             user will have to change her password.
140           </para>
141           <para>
142             After this number of days is elapsed, the password may still
143             be valid.  The user should be asked to change her password the
144             next time she will log in.
145           </para>
146           <para>
147             An empty field means that there are no maximum password age,
148             no password warning period, and no password inactivity period
149             (see below).
150           </para>
151           <para>
152             If the maximum password age is lower than the minimum password
153             age, the user cannot change her password.
154           </para>
155         </listitem>
156       </varlistentry>
157       <varlistentry>
158         <term>
159           <emphasis role="bold">password warning period</emphasis>
160         </term>
161         <listitem>
162           <para>
163             The number of days before a password is going to expire (see
164             the maximum password age above) during which the user should
165             be warned.
166           </para>
167           <para>
168             An empty field and value 0 mean that there are no password
169             warning period.
170           </para>
171         </listitem>
172       </varlistentry>
173       <varlistentry>
174         <term>
175           <emphasis role="bold">password inactivity period</emphasis>
176         </term>
177         <listitem>
178           <para>
179             The number of days after a password has expired (see the
180             maximum password age above) during which the password should
181             still be accepted (and the user should update her password
182             during the next login).
183           </para>
184           <para>
185             After expiration of the password and this expiration period is
186             elapsed, no login is possible using the current user's
187             password.  The user should contact her administrator.
188           </para>
189           <para>
190             An empty field means that there are no enforcement of an
191             inactivity period.
192           </para>
193         </listitem>
194       </varlistentry>
195       <varlistentry>
196         <term>
197           <emphasis role="bold">account expiration date</emphasis>
198         </term>
199         <listitem>
200           <para>
201             The date of expiration of the account, expressed as the number
202             of days since Jan 1, 1970.
203           </para>
204           <para>
205             Note that an account expiration differs from a password
206             expiration.  In case of an acount expiration, the user shall
207             not be allowed to login.  In case of a password expiration,
208             the user is not allowed to login using her password.
209           </para>
210           <para>
211             An empty field means that the account will never expire.
212           </para>
213           <para>
214             The value 0 should not be used as it is interpreted as either
215             an account with no expiration, or as an expiration on Jan 1,
216             1970.
217           </para>
218         </listitem>
219       </varlistentry>
220       <varlistentry>
221         <term><emphasis role="bold">reserved field</emphasis></term>
222         <listitem>
223           <para>This field is reserved for future use.</para>
224         </listitem>
225       </varlistentry>
226     </variablelist>
227   </refsect1>
228
229   <refsect1 id='files'>
230     <title>FILES</title>
231     <variablelist>
232       <varlistentry>
233         <term><filename>/etc/passwd</filename></term>
234         <listitem>
235           <para>User account information.</para>
236         </listitem>
237       </varlistentry>
238       <varlistentry>
239         <term><filename>/etc/shadow</filename></term>
240         <listitem>
241           <para>Secure user account information.</para>
242         </listitem>
243       </varlistentry>
244       <varlistentry>
245         <term><filename>/etc/shadow-</filename></term>
246         <listitem>
247           <para>Backup file for /etc/shadow.</para>
248           <para>
249             Note that this file is used by the tools of the shadow
250             toolsuite, but not by all user and password management tools.
251           </para>
252         </listitem>
253       </varlistentry>
254     </variablelist>
255   </refsect1>
256
257   <refsect1 id='see_also'>
258     <title>SEE ALSO</title>
259     <para>
260       <citerefentry>
261         <refentrytitle>chage</refentrytitle><manvolnum>1</manvolnum>
262       </citerefentry>,
263       <citerefentry>
264         <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
265       </citerefentry>,
266       <citerefentry>
267         <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
268       </citerefentry>,
269       <citerefentry>
270         <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
271       </citerefentry>,
272       <citerefentry>
273         <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
274       </citerefentry>,
275       <citerefentry>
276         <refentrytitle>pwconv</refentrytitle><manvolnum>8</manvolnum>
277       </citerefentry>,
278       <citerefentry>
279         <refentrytitle>pwunconv</refentrytitle><manvolnum>8</manvolnum>
280       </citerefentry>,
281       <citerefentry>
282         <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
283       </citerefentry>,
284       <citerefentry>
285         <refentrytitle>sulogin</refentrytitle><manvolnum>8</manvolnum>
286       </citerefentry>.
287     </para>
288   </refsect1>
289 </refentry>