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 <!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 -->
35 <refentry id='shadow.5'>
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>
44 <refnamediv id='name'>
45 <refname>shadow</refname>
46 <refpurpose>shadowed password file</refpurpose>
49 <refsect1 id='description'>
50 <title>DESCRIPTION</title>
52 <filename>shadow</filename> is a file which contains the password
53 information for the system's accounts and optional aging
58 This file must not be readable by regular users if password security
63 Each line of this file contains 9 fields, separated by colons
64 (<quote>:</quote>), in the following order:
69 <term><emphasis role="bold">login name</emphasis></term>
72 It must be a valid account name, which exist on the system.
77 <term><emphasis role="bold">encrypted password</emphasis></term>
80 Refer to <citerefentry><refentrytitle>crypt</refentrytitle>
81 <manvolnum>3</manvolnum></citerefentry> for details on how
82 this string is interpreted.
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).
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.
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
108 <emphasis role="bold">date of last password change</emphasis>
112 The date of the last password change, expressed as the number
113 of days since Jan 1, 1970.
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
121 An empty field means that password aging features are
127 <term><emphasis role="bold">minimum password age</emphasis></term>
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
135 An empty field and value 0 mean that there are no minimum
141 <term><emphasis role="bold">maximum password age</emphasis></term>
144 The maximum password age is the number of days after which the
145 user will have to change her password.
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.
153 An empty field means that there are no maximum password age,
154 no password warning period, and no password inactivity period
158 If the maximum password age is lower than the minimum password
159 age, the user cannot change her password.
165 <emphasis role="bold">password warning period</emphasis>
169 The number of days before a password is going to expire (see
170 the maximum password age above) during which the user should
174 An empty field and value 0 mean that there are no password
181 <emphasis role="bold">password inactivity period</emphasis>
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).
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.
196 An empty field means that there are no enforcement of an
203 <emphasis role="bold">account expiration date</emphasis>
207 The date of expiration of the account, expressed as the number
208 of days since Jan 1, 1970.
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.
217 An empty field means that the account will never expire.
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,
227 <term><emphasis role="bold">reserved field</emphasis></term>
229 <para>This field is reserved for future use.</para>
235 <refsect1 id='files'>
239 <term><filename>/etc/passwd</filename></term>
241 <para>User account information.</para>
245 <term><filename>/etc/shadow</filename></term>
247 <para>Secure user account information.</para>
251 <term><filename>/etc/shadow-</filename></term>
253 <para>Backup file for /etc/shadow.</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.
263 <refsect1 id='see_also'>
264 <title>SEE ALSO</title>
267 <refentrytitle>chage</refentrytitle><manvolnum>1</manvolnum>
270 <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
273 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
276 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
279 <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
282 <refentrytitle>pwconv</refentrytitle><manvolnum>8</manvolnum>
285 <refentrytitle>pwunconv</refentrytitle><manvolnum>8</manvolnum>
288 <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
291 <refentrytitle>sulogin</refentrytitle><manvolnum>8</manvolnum>