shadow/man/chage.1

110 lines
4.8 KiB
Groff
Raw Normal View History

.\" Copyright 1990 - 1994 Julianne Frances Haugh
.\" 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. Neither the name of Julianne F. Haugh nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH 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 JULIE HAUGH 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.
.\"
.\" $Id: chage.1,v 1.5 1999/03/07 19:14:45 marekm Exp $
.\"
.TH CHAGE 1
.SH NAME
chage \- change user password expiry information
.SH SYNOPSIS
.TP 6
\fBchage\fR
[\fB-m \fImindays\fR] [\fB-M \fImaxdays\fR]
[\fB-d \fIlastday\fR] [\fB-I \fIinactive\fR]
.br
[\fB-E \fIexpiredate\fR] [\fB-W \fIwarndays\fR] \fIuser\fR
.TP 6
\fBchage\fR
\fB-l\fR \fIuser\fR
.SH DESCRIPTION
\fBchage\fR changes the number of days between password changes and the
date of the last password change.
This information is used by the system to determine when a user must
change her password.
The \fBchage\fR command is restricted to the root user, except for the
\fB-l\fR option, which may be used by an unprivileged user to determine
when her password or account is due to expire.
.PP
With the \fB-m\fR option, the value of \fImindays\fR is the minimum number
of days between password changes.
A value of zero for this field indicates that the user may change
her password at any time.
.PP
With the \fB-M\fR option, the value of \fImaxdays\fR is the maximum number
of days during which a password is valid.
When \fImaxdays\fR plus \fIlastday\fR is less than the current day,
the user will be required to change her password before being
able to use her account.
This occurance can be planned for in advance by use of the \fB-W\fR option,
which provides the user with advance warning.
.PP
With the \fB-d\fR option, the value of \fIlastday\fR is 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).
.PP
The \fB-E\fR option is used to set a date on which the user's account will
no longer be accessible.
The \fIexpiredate\fR option is the number of days since January 1, 1970 on
which the accounted is locked.
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.
.PP
The \fB-I\fR option is used to set the number of days of inactivity after
a password has expired before the account is locked.
A user whose account is locked must contact the system administrator before
being able to use the system again.
The \fIinactive\fR option is the number of days of inactivity. A value of
0 disables this feature.
.PP
The \fB-W\fR option is used to set the number of days of warning before a
password change is required.
The \fIwarndays\fR option is the number of days prior to the password
expiring that a user will be warned her password is about to expire.
.PP
All of the above values are stored exactly as days when the shadow
password file is used, but are converted to and from weeks when the
standard password file is used.
Because of this conversion, rounding errors may result.
.PP
If none of the options are selected, \fBchage\fR operates in an interactive
fashion, prompting the user with the current values for all of the fields.
Enter the new value to change the field, or leave the line blank to use
the current value.
The current value is displayed between a pair of \fB[ ]\fR marks.
.SH FILES
/etc/passwd \- user account information
.br
/etc/shadow \- shadow user account information
.SH SEE ALSO
.BR passwd (5),
.BR shadow (5)
.SH AUTHOR
Julianne Frances Haugh (jfh@bga.com)