]> granicus.if.org Git - shadow/blob - man/chage.1.xml
remove unused fn commonio_next
[shadow] / 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 - 2011, 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 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
32   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
33 <!ENTITY USE_TCB               SYSTEM "login.defs.d/USE_TCB.xml">
34 <!-- SHADOW-CONFIG-HERE -->
35 ]>
36 <refentry id='chage.1'>
37   <!--  $Id$  -->
38   <refentryinfo>
39     <author>
40       <firstname>Julianne Frances</firstname>
41       <surname>Haugh</surname>
42       <contrib>Creation, 1990</contrib>
43     </author>
44     <author>
45       <firstname>Thomas</firstname>
46       <surname>Kłoczko</surname>
47       <email>kloczek@pld.org.pl</email>
48       <contrib>shadow-utils maintainer, 2000 - 2007</contrib>
49     </author>
50     <author>
51       <firstname>Nicolas</firstname>
52       <surname>François</surname>
53       <email>nicolas.francois@centraliens.net</email>
54       <contrib>shadow-utils maintainer, 2007 - now</contrib>
55     </author>
56   </refentryinfo>
57   <refmeta>
58     <refentrytitle>chage</refentrytitle>
59     <manvolnum>1</manvolnum>
60     <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
61     <refmiscinfo class="source">shadow-utils</refmiscinfo>
62     <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
63   </refmeta>
64   <refnamediv id='name'>
65     <refname>chage</refname>
66     <refpurpose>change user password expiry information</refpurpose>
67   </refnamediv>
68   <refsynopsisdiv id='synopsis'>
69     <cmdsynopsis>
70       <command>chage</command>
71       <arg choice='opt'>
72         <replaceable>options</replaceable>
73       </arg>
74       <arg choice='plain'>
75         <replaceable>LOGIN</replaceable>
76       </arg>
77     </cmdsynopsis>
78   </refsynopsisdiv>
79
80   <refsect1 id='description'>
81     <title>DESCRIPTION</title>
82     <para>
83       The <command>chage</command> command changes the number of days between
84       password changes and the date of the last password change. This
85       information is used by the system to determine when a user must change
86       their password.
87     </para>
88   </refsect1>
89
90   <refsect1 id='options'>
91     <title>OPTIONS</title>
92     <para>
93       The options which apply to the <command>chage</command> command are:
94     </para>
95     <variablelist remap='IP'>
96       <varlistentry>
97         <term>
98           <option>-d</option>, <option>--lastday</option>&nbsp;<replaceable>LAST_DAY</replaceable>
99         </term>
100         <listitem>
101           <para>
102             Set the number of days since January 1st, 1970 when the password
103             was last changed. The date may also be expressed in the format
104             YYYY-MM-DD (or the format more commonly used in your area).
105           </para>
106         </listitem>
107       </varlistentry>
108       <varlistentry>
109         <term>
110           <option>-E</option>, <option>--expiredate</option>&nbsp;<replaceable>EXPIRE_DATE</replaceable>
111         </term>
112         <listitem>
113           <para>
114             Set the date or number of days since January 1, 1970 on which the
115             user's account will no longer be accessible. The date may also
116             be expressed in the format YYYY-MM-DD (or the format more
117             commonly used in your area). A user whose account is locked must
118             contact the system administrator before being able to use the
119             system again.
120           </para>
121           <para>
122             Passing the number <emphasis remap='I'>-1</emphasis> as the
123             <replaceable>EXPIRE_DATE</replaceable> will remove an account
124             expiration date.
125           </para>
126         </listitem>
127       </varlistentry>
128       <varlistentry>
129         <term><option>-h</option>, <option>--help</option></term>
130         <listitem>
131           <para>Display help message and exit.</para>
132         </listitem>
133       </varlistentry>
134       <varlistentry>
135         <term><option>-i</option>, <option>--iso8601</option></term>
136         <listitem>
137           <para>When printing dates, use YYYY-MM-DD format.</para>
138         </listitem>
139       </varlistentry>
140       <varlistentry>
141         <term>
142           <option>-I</option>, <option>--inactive</option>&nbsp;<replaceable>INACTIVE</replaceable>
143         </term>
144         <listitem>
145           <para>
146             Set the number of days of inactivity after a password has
147             expired before the account is locked. The
148             <replaceable>INACTIVE</replaceable> option is the number of days
149             of inactivity. A user whose account is locked must contact the
150             system administrator before being able to use the system again.
151           </para>
152           <para>
153             Passing the number <emphasis remap='I'>-1</emphasis> as the
154             <replaceable>INACTIVE</replaceable> will remove an account's
155             inactivity.
156           </para>
157         </listitem>
158       </varlistentry>
159       <varlistentry>
160         <term>
161           <option>-l</option>, <option>--list</option>
162         </term>
163         <listitem>
164           <para>
165           Show account aging information.
166           </para>
167         </listitem>
168       </varlistentry>
169       <varlistentry>
170         <term>
171           <option>-m</option>, <option>--mindays</option>&nbsp;<replaceable>MIN_DAYS</replaceable>
172         </term>
173         <listitem>
174           <para>
175             Set the minimum number of days between password changes to
176             <replaceable>MIN_DAYS</replaceable>. A value of zero for this field
177             indicates that the user may change their password at any time.
178           </para>
179         </listitem>
180       </varlistentry>
181       <varlistentry>
182         <term>
183           <option>-M</option>, <option>--maxdays</option>&nbsp;<replaceable>MAX_DAYS</replaceable>
184         </term>
185         <listitem>
186           <para>
187             Set the maximum number of days during which a password is valid. 
188             When <replaceable>MAX_DAYS</replaceable> plus
189             <replaceable>LAST_DAY</replaceable> is less than the current
190             day, the user will be required to change their password before
191             being able to use their account. This occurrence can be planned for
192             in advance by use of the <option>-W</option> option, which
193             provides the user with advance warning.
194           </para>
195           <para>
196             Passing the number <emphasis remap='I'>-1</emphasis> as
197             <replaceable>MAX_DAYS</replaceable> will remove checking a
198             password's validity.
199           </para>
200         </listitem>
201       </varlistentry>
202       <varlistentry>
203         <term>
204           <option>-R</option>, <option>--root</option>&nbsp;<replaceable>CHROOT_DIR</replaceable>
205         </term>
206         <listitem>
207           <para>
208             Apply changes in the <replaceable>CHROOT_DIR</replaceable>
209             directory and use the configuration files from the
210             <replaceable>CHROOT_DIR</replaceable> directory.
211           </para>
212         </listitem>
213       </varlistentry>
214       <varlistentry>
215         <term>
216           <option>-W</option>, <option>--warndays</option>&nbsp;<replaceable>WARN_DAYS</replaceable>
217         </term>
218         <listitem>
219           <para>
220             Set the number of days of warning before a password change is
221             required. The <replaceable>WARN_DAYS</replaceable> option is the
222             number of days prior to the password expiring that a user will
223             be warned their password is about to expire.
224           </para>
225         </listitem>
226       </varlistentry>
227     </variablelist>
228     <para>
229       If none of the options are selected, <command>chage</command> operates
230       in an interactive fashion, prompting the user with the current values
231       for all of the fields. Enter the new value to change the field, or
232       leave the line blank to use the current value. The current value is
233       displayed between a pair of <emphasis>[ ]</emphasis> marks.
234     </para>
235   </refsect1>
236   <refsect1 id='note'>
237     <title>NOTE</title>
238     <para>
239       The <command>chage</command> program requires a shadow password file to
240       be available.
241     </para>
242     <para>The <command>chage</command> command is restricted to the root
243       user, except for the <option>-l</option> option, which may be used by
244       an unprivileged user to determine when their password or account is due
245       to expire.
246     </para>
247   </refsect1>
248
249   <refsect1 id='configuration'>
250     <title>CONFIGURATION</title>
251     <para>
252       The following configuration variables in
253       <filename>/etc/login.defs</filename> change the behavior of this
254       tool:
255     </para>
256     <variablelist>
257       &USE_TCB;
258     </variablelist>
259   </refsect1>
260
261   <refsect1 id='files'>
262     <title>FILES</title>
263     <variablelist>
264       <varlistentry>
265         <term>
266           <filename>/etc/passwd</filename>
267         </term>
268         <listitem>
269           <para>User account information.</para>
270         </listitem>
271       </varlistentry>
272       <varlistentry>
273         <term>
274           <filename>/etc/shadow</filename>
275         </term>
276         <listitem>
277           <para>Secure user account information.</para>
278         </listitem>
279       </varlistentry>
280     </variablelist>
281   </refsect1>
282
283   <refsect1 id='exit_values'>
284     <title>EXIT VALUES</title>
285     <para>
286       The <command>chage</command> command exits with the following values:
287       <variablelist>
288         <varlistentry>
289           <term><replaceable>0</replaceable></term>
290           <listitem>
291             <para>success</para>
292           </listitem>
293         </varlistentry>
294         <varlistentry>
295           <term><replaceable>1</replaceable></term>
296           <listitem>
297             <para>permission denied</para>
298           </listitem>
299         </varlistentry>
300         <varlistentry>
301           <term><replaceable>2</replaceable></term>
302           <listitem>
303             <para>invalid command syntax</para>
304           </listitem>
305         </varlistentry>
306         <varlistentry>
307           <term><replaceable>15</replaceable></term>
308           <listitem>
309             <para>can't find the shadow password file</para>
310           </listitem>
311         </varlistentry>
312       </variablelist>
313     </para>
314   </refsect1>
315
316   <refsect1 id='see_also'>
317     <title>SEE ALSO</title>
318     <para>
319       <citerefentry>
320         <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
321       </citerefentry>,
322       <citerefentry>
323         <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
324       </citerefentry>.
325     </para>
326   </refsect1>
327 </refentry>