1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1990 - 1994, Julianne Frances Haugh
4 Copyright (c) 2007 - 2008, 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='chage.1'>
32 <!-- $Id: chage.1.xml 2435 2008-10-11 11:44:43Z nekral-guest $ -->
34 <refentrytitle>chage</refentrytitle>
35 <manvolnum>1</manvolnum>
36 <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
38 <refnamediv id='name'>
39 <refname>chage</refname>
40 <refpurpose>change user password expiry information</refpurpose>
42 <refsynopsisdiv id='synopsis'>
44 <command>chage</command>
46 <replaceable>options</replaceable>
49 <replaceable>LOGIN</replaceable>
54 <refsect1 id='description'>
55 <title>DESCRIPTION</title>
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
64 <refsect1 id='options'>
65 <title>OPTIONS</title>
67 The options which apply to the <command>chage</command> command are:
69 <variablelist remap='IP'>
72 <option>-d</option>, <option>--lastday</option> <replaceable>LAST_DAY</replaceable>
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).
84 <option>-E</option>, <option>--expiredate</option> <replaceable>EXPIRE_DATE</replaceable>
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
96 Passing the number <emphasis remap='I'>-1</emphasis> as the
97 <replaceable>EXPIRE_DATE</replaceable> will remove an account
103 <term><option>-h</option>, <option>--help</option></term>
105 <para>Display help message and exit.</para>
110 <option>-I</option>, <option>--inactive</option> <replaceable>INACTIVE</replaceable>
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.
121 Passing the number <emphasis remap='I'>-1</emphasis> as the
122 <replaceable>INACTIVE</replaceable> will remove an account's
129 <option>-l</option>, <option>--list</option>
133 Show account aging information.
139 <option>-m</option>, <option>--mindays</option> <replaceable>MIN_DAYS</replaceable>
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.
151 <option>-M</option>, <option>--maxdays</option> <replaceable>MAX_DAYS</replaceable>
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.
164 Passing the number <emphasis remap='I'>-1</emphasis> as
165 <replaceable>MAX_DAYS</replaceable> will remove checking a
172 <option>-W</option>, <option>--warndays</option> <replaceable>WARN_DAYS</replaceable>
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.
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.
195 The <command>chage</command> program requires a shadow password file to
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
205 <refsect1 id='files'>
210 <filename>/etc/passwd</filename>
213 <para>User account information.</para>
218 <filename>/etc/shadow</filename>
221 <para>Secure user account information.</para>
227 <refsect1 id='exit_values'>
228 <title>EXIT VALUES</title>
230 The <command>chage</command> command exits with the following values:
233 <term><replaceable>0</replaceable></term>
239 <term><replaceable>1</replaceable></term>
241 <para>permission denied</para>
245 <term><replaceable>2</replaceable></term>
247 <para>invalid command syntax</para>
251 <term><replaceable>15</replaceable></term>
253 <para>can't find the shadow password file</para>
260 <refsect1 id='see_also'>
261 <title>SEE ALSO</title>
264 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
267 <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>