2007-10-07 17:16:16 +05:30
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2008-10-11 17:14:43 +05:30
|
|
|
<!--
|
|
|
|
Copyright (c) 1990 - 1994, Julianne Frances Haugh
|
|
|
|
Copyright (c) 2007 - 2008, Nicolas François
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions
|
|
|
|
are met:
|
|
|
|
1. Redistributions of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer in the
|
|
|
|
documentation and/or other materials provided with the distribution.
|
|
|
|
3. The name of the copyright holders or contributors may not be used to
|
|
|
|
endorse or promote products derived from this software without
|
|
|
|
specific prior written permission.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
|
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
-->
|
2007-10-07 17:16:16 +05:30
|
|
|
<refentry id='chage.1'>
|
2007-11-11 05:16:11 +05:30
|
|
|
<!-- $Id$ -->
|
2007-10-07 17:16:16 +05:30
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>chage</refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
|
|
|
<refmiscinfo class="sectdesc">User Commands</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv id='name'>
|
|
|
|
<refname>chage</refname>
|
|
|
|
<refpurpose>change user password expiry information</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv id='synopsis'>
|
|
|
|
<cmdsynopsis>
|
2007-10-07 17:16:25 +05:30
|
|
|
<command>chage</command>
|
|
|
|
<arg choice='opt'>
|
|
|
|
<replaceable>options</replaceable>
|
2007-10-07 17:16:16 +05:30
|
|
|
</arg>
|
2007-10-07 17:17:57 +05:30
|
|
|
<arg choice='opt'>
|
|
|
|
<replaceable>LOGIN</replaceable>
|
|
|
|
</arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='description'>
|
|
|
|
<title>DESCRIPTION</title>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>
|
2007-10-07 17:17:22 +05:30
|
|
|
The <command>chage</command> command changes the number of days between
|
2007-10-07 17:17:01 +05:30
|
|
|
password changes and the date of the last password change. This
|
|
|
|
information is used by the system to determine when a user must change
|
2007-10-07 17:17:22 +05:30
|
|
|
his/her password.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='options'>
|
|
|
|
<title>OPTIONS</title>
|
|
|
|
<para>
|
|
|
|
The options which apply to the <command>chage</command> command are:
|
|
|
|
</para>
|
|
|
|
<variablelist remap='IP'>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-d</option>, <option>--lastday</option> <replaceable>LAST_DAY</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Set the number of days since January 1st, 1970 when the password
|
|
|
|
was last changed. The date may also be expressed in the format
|
|
|
|
YYYY-MM-DD (or the format more commonly used in your area).
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-E</option>, <option>--expiredate</option> <replaceable>EXPIRE_DATE</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:17:22 +05:30
|
|
|
Set the date or number of days since January 1, 1970 on which the
|
2007-10-07 17:17:01 +05:30
|
|
|
user's account will no longer be accessible. The date may also
|
|
|
|
be expressed in the format YYYY-MM-DD (or the format more
|
|
|
|
commonly used in your area). A user whose account is locked must
|
|
|
|
contact the system administrator before being able to use the
|
|
|
|
system again.
|
2007-10-07 17:16:52 +05:30
|
|
|
</para>
|
|
|
|
<para>
|
2007-10-07 17:17:01 +05:30
|
|
|
Passing the number <emphasis remap='I'>-1</emphasis> as the
|
|
|
|
<replaceable>EXPIRE_DATE</replaceable> will remove an account
|
|
|
|
expiration date.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>-h</option>, <option>--help</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Display help message and exit.</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-I</option>, <option>--inactive</option> <replaceable>INACTIVE</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Set the number of days of inactivity after a password has
|
|
|
|
expired before the account is locked. The
|
|
|
|
<replaceable>INACTIVE</replaceable> option is the number of days
|
|
|
|
of inactivity. A user whose account is locked must contact the
|
|
|
|
system administrator before being able to use the system again.
|
2007-10-07 17:16:52 +05:30
|
|
|
</para>
|
|
|
|
<para>
|
2007-10-07 17:17:01 +05:30
|
|
|
Passing the number <emphasis remap='I'>-1</emphasis> as the
|
2007-10-07 17:17:22 +05:30
|
|
|
<replaceable>INACTIVE</replaceable> will remove an account's
|
2007-10-07 17:17:01 +05:30
|
|
|
inactivity.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-l</option>, <option>--list</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:16:25 +05:30
|
|
|
Show account aging information.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:25 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-m</option>, <option>--mindays</option> <replaceable>MIN_DAYS</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:17:33 +05:30
|
|
|
Set the minimum number of days between password changes to
|
|
|
|
<replaceable>MIN_DAYS</replaceable>. A value of zero for this field
|
|
|
|
indicates that the user may change his/her password at any time.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-M</option>, <option>--maxdays</option> <replaceable>MAX_DAYS</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:17:22 +05:30
|
|
|
Set the maximum number of days during which a password is valid.
|
2007-10-07 17:17:01 +05:30
|
|
|
When <replaceable>MAX_DAYS</replaceable> plus
|
|
|
|
<replaceable>LAST_DAY</replaceable> is less than the current
|
2007-10-07 17:17:22 +05:30
|
|
|
day, the user will be required to change his/her password before
|
|
|
|
being able to use his/her account. This occurrence can be planned for
|
2007-10-07 17:17:01 +05:30
|
|
|
in advance by use of the <option>-W</option> option, which
|
|
|
|
provides the user with advance warning.
|
|
|
|
</para>
|
2007-10-07 17:16:52 +05:30
|
|
|
<para>
|
2007-10-07 17:17:22 +05:30
|
|
|
Passing the number <emphasis remap='I'>-1</emphasis> as
|
2007-10-07 17:17:01 +05:30
|
|
|
<replaceable>MAX_DAYS</replaceable> will remove checking a
|
2007-10-07 17:17:22 +05:30
|
|
|
password's validity.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-W</option>, <option>--warndays</option> <replaceable>WARN_DAYS</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Set the number of days of warning before a password change is
|
|
|
|
required. The <replaceable>WARN_DAYS</replaceable> option is the
|
|
|
|
number of days prior to the password expiring that a user will
|
2007-10-07 17:17:22 +05:30
|
|
|
be warned his/her password is about to expire.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
<para>
|
|
|
|
If none of the options are selected, <command>chage</command> operates
|
|
|
|
in an interactive fashion, prompting the user with the current values
|
2007-10-07 17:16:25 +05:30
|
|
|
for all of the fields. Enter the new value to change the field, or
|
2007-10-07 17:16:16 +05:30
|
|
|
leave the line blank to use the current value. The current value is
|
2007-10-07 17:17:01 +05:30
|
|
|
displayed between a pair of <emphasis>[ ]</emphasis> marks.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 id='note'>
|
|
|
|
<title>NOTE</title>
|
|
|
|
<para>
|
2007-10-07 17:17:22 +05:30
|
|
|
The <command>chage</command> program requires a shadow password file to
|
2007-10-07 17:17:33 +05:30
|
|
|
be available.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
2007-10-07 17:16:25 +05:30
|
|
|
<para>The <command>chage</command> command is restricted to the root
|
|
|
|
user, except for the <option>-l</option> option, which may be used by
|
2007-10-07 17:17:22 +05:30
|
|
|
an unprivileged user to determine when his/her password or account is due
|
2007-10-07 17:16:25 +05:30
|
|
|
to expire.
|
|
|
|
</para>
|
2007-10-07 17:16:16 +05:30
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='files'>
|
|
|
|
<title>FILES</title>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<filename>/etc/passwd</filename>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
2007-10-07 17:17:33 +05:30
|
|
|
<para>User account information.</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<filename>/etc/shadow</filename>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
2007-10-07 17:17:33 +05:30
|
|
|
<para>Secure user account information.</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
|
|
|
<refsect1 id='exit_values'>
|
|
|
|
<title>EXIT VALUES</title>
|
|
|
|
<para>
|
|
|
|
The <command>chage</command> command exits with the following values:
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>0</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>success</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>1</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>permission denied</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>2</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>invalid command syntax</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>15</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>can't find the shadow password file</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='see_also'>
|
|
|
|
<title>SEE ALSO</title>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|