1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1989 - 1990, Julianne Frances Haugh
4 Copyright (c) 2007 - 2009, Nicolas François
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
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.
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.
31 <refentry id='shadow.5'>
34 <refentrytitle>shadow</refentrytitle>
35 <manvolnum>5</manvolnum>
36 <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
38 <refnamediv id='name'>
39 <refname>shadow</refname>
40 <refpurpose>shadowed password file</refpurpose>
43 <refsect1 id='description'>
44 <title>DESCRIPTION</title>
46 <filename>shadow</filename> is a file which contains the password
47 information for the system's accounts and optional aging
52 This file must not be readable by regular users if password security
57 Each line of this file contains 9 fields, separated by colons
58 (<quote>:</quote>), in the following order:
63 <term><emphasis role="bold">login name</emphasis></term>
66 It must be a valid account name, which exist on the system.
71 <term><emphasis role="bold">encrypted password</emphasis></term>
74 Refer to <citerefentry><refentrytitle>crypt</refentrytitle>
75 <manvolnum>3</manvolnum></citerefentry> for details on how
76 this string is interpreted.
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).
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.
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
102 <emphasis role="bold">date of last password change</emphasis>
106 The date of the last password change, expressed as the number
107 of days since Jan 1, 1970.
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
115 An empty field means that password aging features are
121 <term><emphasis role="bold">minimum password age</emphasis></term>
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
129 An empty field and value 0 mean that there are no minimum
135 <term><emphasis role="bold">maximum password age</emphasis></term>
138 The maximum password age is the number of days after which the
139 user will have to change her password.
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.
147 An empty field means that there are no maximum password age,
148 no password warning period, and no password inactivity period
152 If the maximum password age is lower than the minimum password
153 age, the user cannot change her password.
159 <emphasis role="bold">password warning period</emphasis>
163 The number of days before a password is going to expire (see
164 the maximum password age above) during which the user should
168 An empty field and value 0 mean that there are no password
175 <emphasis role="bold">password inactivity period</emphasis>
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).
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.
190 An empty field means that there are no enforcement of an
197 <emphasis role="bold">account expiration date</emphasis>
201 The date of expiration of the account, expressed as the number
202 of days since Jan 1, 1970.
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.
211 An empty field means that the account will never expire.
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,
221 <term><emphasis role="bold">reserved field</emphasis></term>
223 <para>This field is reserved for future use.</para>
229 <refsect1 id='files'>
233 <term><filename>/etc/passwd</filename></term>
235 <para>User account information.</para>
239 <term><filename>/etc/shadow</filename></term>
241 <para>Secure user account information.</para>
247 <refsect1 id='see_also'>
248 <title>SEE ALSO</title>
251 <refentrytitle>chage</refentrytitle><manvolnum>1</manvolnum>
254 <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
257 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
260 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
263 <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
266 <refentrytitle>pwconv</refentrytitle><manvolnum>8</manvolnum>
269 <refentrytitle>pwunconv</refentrytitle><manvolnum>8</manvolnum>
272 <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
275 <refentrytitle>sulogin</refentrytitle><manvolnum>8</manvolnum>