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