]> granicus.if.org Git - shadow/blob - man/chage.1.xml
[svn-upgrade] Integrating new upstream version, shadow (4.0.14)
[shadow] / man / chage.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='chage.1'>
5   <!--  $Id: chage.1.xml,v 1.29 2005/11/05 17:17:29 kloczek Exp $  -->
6   <refmeta>
7     <refentrytitle>chage</refentrytitle>
8     <manvolnum>1</manvolnum>
9     <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
10   </refmeta>
11   <refnamediv id='name'>
12     <refname>chage</refname>
13     <refpurpose>change user password expiry information</refpurpose>
14   </refnamediv>
15   <refsynopsisdiv id='synopsis'>
16     <cmdsynopsis>
17       <command>chage</command>
18       <arg choice='opt'>
19         <replaceable>options</replaceable>
20       </arg>
21       <arg choice='plain'><replaceable>user</replaceable></arg>
22     </cmdsynopsis>
23   </refsynopsisdiv>
24
25   <refsect1 id='description'>
26     <title>DESCRIPTION</title>
27     <para>
28       <command>chage</command> command changes the number of days between
29       password changes and the date of the last password change. This
30       information is used by the system to determine when a user must change
31       her password.
32     </para>
33   </refsect1>
34
35   <refsect1 id='options'>
36     <title>OPTIONS</title>
37     <para>
38       The options which apply to the <command>chage</command> command are:
39     </para>
40     <variablelist remap='IP'>
41       <varlistentry>
42         <term>
43           <option>-d</option>, <option>--lastday</option> <replaceable>LAST_DAY</replaceable>
44         </term>
45         <listitem>
46           <para>
47             Set the number of days since January 1st, 1970 when the password
48             was last changed. The date may also be expressed in the format
49             YYYY-MM-DD (or the format more commonly used in your area).
50           </para>
51         </listitem>
52       </varlistentry>
53       <varlistentry>
54         <term>
55           <option>-E</option>, <option>--expiredate</option> <replaceable>EXPIRE_DATE</replaceable>
56         </term>
57         <listitem>
58           <para>
59             Set the date number of days since January 1, 1970 on which the
60             user's account will no longer be accessible. The date may also
61             be expressed in the format YYYY-MM-DD (or the format more
62             commonly used in your area). A user whose account is locked must
63             contact the system administrator before being able to use the
64             system again.
65           </para>
66           <para>
67             Passing the number <emphasis remap='I'>-1</emphasis> as the
68             <replaceable>EXPIRE_DATE</replaceable> will remove an account
69             expiration date.
70           </para>
71         </listitem>
72       </varlistentry>
73       <varlistentry>
74         <term><option>-h</option>, <option>--help</option></term>
75         <listitem>
76           <para>Display help message and exit.</para>
77         </listitem>
78       </varlistentry>
79       <varlistentry>
80         <term>
81           <option>-I</option>, <option>--inactive</option> <replaceable>INACTIVE</replaceable>
82         </term>
83         <listitem>
84           <para>
85             Set the number of days of inactivity after a password has
86             expired before the account is locked. The
87             <replaceable>INACTIVE</replaceable> option is the number of days
88             of inactivity. A user whose account is locked must contact the
89             system administrator before being able to use the system again.
90           </para>
91           <para>
92             Passing the number <emphasis remap='I'>-1</emphasis> as the
93             <replaceable>INACTIVE</replaceable> will remove an accounts
94             inactivity.
95           </para>
96         </listitem>
97       </varlistentry>
98       <varlistentry>
99         <term>
100           <option>-l</option>, <option>--list</option>
101         </term>
102         <listitem>
103           <para>
104           Show account aging information.
105           </para>
106         </listitem>
107       </varlistentry>
108       <varlistentry>
109         <term>
110           <option>-m</option>, <option>--mindays</option> <replaceable>MIN_DAYS</replaceable>
111         </term>
112         <listitem>
113           <para>
114             Set the minimum number of days between password changes. A value
115             of zero for this field indicates that the user may change her
116             password at any time.
117           </para>
118         </listitem>
119       </varlistentry>
120       <varlistentry>
121         <term>
122           <option>-M</option>, <option>--maxdays</option> <replaceable>MAX_DAYS</replaceable>
123         </term>
124         <listitem>
125           <para>
126             Set maximum number of days during which a password is valid. 
127             When <replaceable>MAX_DAYS</replaceable> plus
128             <replaceable>LAST_DAY</replaceable> is less than the current
129             day, the user will be required to change her password before
130             being able to use her account. This occurrence can be planned for
131             in advance by use of the <option>-W</option> option, which
132             provides the user with advance warning.
133           </para>
134           <para>
135             Passing the number <emphasis remap='I'>-1</emphasis> as the
136             <replaceable>MAX_DAYS</replaceable> will remove checking a
137             password validation.
138           </para>
139         </listitem>
140       </varlistentry>
141       <varlistentry>
142         <term>
143           <option>-W</option>, <option>--warndays</option> <replaceable>WARN_DAYS</replaceable>
144         </term>
145         <listitem>
146           <para>
147             Set the number of days of warning before a password change is
148             required. The <replaceable>WARN_DAYS</replaceable> option is the
149             number of days prior to the password expiring that a user will
150             be warned her password is about to expire.
151           </para>
152         </listitem>
153       </varlistentry>
154     </variablelist>
155     <para>
156       If none of the options are selected, <command>chage</command> operates
157       in an interactive fashion, prompting the user with the current values
158       for all of the fields. Enter the new value to change the field, or
159       leave the line blank to use the current value. The current value is
160       displayed between a pair of <emphasis>[ ]</emphasis> marks.
161     </para>
162   </refsect1>
163   <refsect1 id='note'>
164     <title>NOTE</title>
165     <para>
166       The <command>chage</command> program requires shadow password file to
167       be available. Its functionality is not available when passwords are
168       stored in the passwd file.
169     </para>
170     <para>The <command>chage</command> command is restricted to the root
171       user, except for the <option>-l</option> option, which may be used by
172       an unprivileged user to determine when her password or account is due
173       to expire.
174     </para>
175   </refsect1>
176
177   <refsect1 id='files'>
178     <title>FILES</title>
179     <variablelist>
180       <varlistentry>
181         <term>
182           <filename>/etc/passwd</filename>
183         </term>
184         <listitem>
185           <para>user account information</para>
186         </listitem>
187       </varlistentry>
188       <varlistentry>
189         <term>
190           <filename>/etc/shadow</filename>
191         </term>
192         <listitem>
193           <para>secure user account information</para>
194         </listitem>
195       </varlistentry>
196     </variablelist>
197   </refsect1>
198
199   <refsect1 id='exit_values'>
200     <title>EXIT VALUES</title>
201     <para>
202       The <command>chage</command> command exits with the following values:
203       <variablelist>
204         <varlistentry>
205           <term><replaceable>0</replaceable></term>
206           <listitem>
207             <para>success</para>
208           </listitem>
209         </varlistentry>
210         <varlistentry>
211           <term><replaceable>1</replaceable></term>
212           <listitem>
213             <para>permission denied</para>
214           </listitem>
215         </varlistentry>
216         <varlistentry>
217           <term><replaceable>2</replaceable></term>
218           <listitem>
219             <para>invalid command syntax</para>
220           </listitem>
221         </varlistentry>
222         <varlistentry>
223           <term><replaceable>15</replaceable></term>
224           <listitem>
225             <para>can't find the shadow password file</para>
226           </listitem>
227         </varlistentry>
228       </variablelist>
229     </para>
230   </refsect1>
231
232   <refsect1 id='see_also'>
233     <title>SEE ALSO</title>
234     <para>
235       <citerefentry>
236         <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
237       </citerefentry>,
238       <citerefentry>
239         <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
240       </citerefentry>.
241     </para>
242   </refsect1>
243 </refentry>