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 $ -->
7 <refentrytitle>chage</refentrytitle>
8 <manvolnum>1</manvolnum>
9 <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
11 <refnamediv id='name'>
12 <refname>chage</refname>
13 <refpurpose>change user password expiry information</refpurpose>
15 <refsynopsisdiv id='synopsis'>
17 <command>chage</command>
19 <replaceable>options</replaceable>
21 <arg choice='plain'><replaceable>user</replaceable></arg>
25 <refsect1 id='description'>
26 <title>DESCRIPTION</title>
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
35 <refsect1 id='options'>
36 <title>OPTIONS</title>
38 The options which apply to the <command>chage</command> command are:
40 <variablelist remap='IP'>
43 <option>-d</option>, <option>--lastday</option> <replaceable>LAST_DAY</replaceable>
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).
55 <option>-E</option>, <option>--expiredate</option> <replaceable>EXPIRE_DATE</replaceable>
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
67 Passing the number <emphasis remap='I'>-1</emphasis> as the
68 <replaceable>EXPIRE_DATE</replaceable> will remove an account
74 <term><option>-h</option>, <option>--help</option></term>
76 <para>Display help message and exit.</para>
81 <option>-I</option>, <option>--inactive</option> <replaceable>INACTIVE</replaceable>
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.
92 Passing the number <emphasis remap='I'>-1</emphasis> as the
93 <replaceable>INACTIVE</replaceable> will remove an accounts
100 <option>-l</option>, <option>--list</option>
104 Show account aging information.
110 <option>-m</option>, <option>--mindays</option> <replaceable>MIN_DAYS</replaceable>
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.
122 <option>-M</option>, <option>--maxdays</option> <replaceable>MAX_DAYS</replaceable>
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.
135 Passing the number <emphasis remap='I'>-1</emphasis> as the
136 <replaceable>MAX_DAYS</replaceable> will remove checking a
143 <option>-W</option>, <option>--warndays</option> <replaceable>WARN_DAYS</replaceable>
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.
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.
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.
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
177 <refsect1 id='files'>
182 <filename>/etc/passwd</filename>
185 <para>user account information</para>
190 <filename>/etc/shadow</filename>
193 <para>secure user account information</para>
199 <refsect1 id='exit_values'>
200 <title>EXIT VALUES</title>
202 The <command>chage</command> command exits with the following values:
205 <term><replaceable>0</replaceable></term>
211 <term><replaceable>1</replaceable></term>
213 <para>permission denied</para>
217 <term><replaceable>2</replaceable></term>
219 <para>invalid command syntax</para>
223 <term><replaceable>15</replaceable></term>
225 <para>can't find the shadow password file</para>
232 <refsect1 id='see_also'>
233 <title>SEE ALSO</title>
236 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
239 <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>