2007-10-07 17:17:33 +05:30
. \" Title: chage
. \" Author:
. \" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
2007-10-07 17:17:57 +05:30
. \" Date: 07/30/2006
2007-10-07 17:17:33 +05:30
. \" Manual: User Commands
. \" Source: User Commands
. \"
2007-10-07 17:17:57 +05:30
.TH "CHAGE" "1" "07/30/2006" "User Commands" "User Commands"
2007-10-07 17:16:52 +05:30
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
2007-10-07 17:14:44 +05:30
chage \- change user password expiry information
2007-10-07 17:16:25 +05:30
.SH "SYNOPSIS"
.HP 6
2007-10-07 17:17:57 +05:30
\fB chage\fR [\fI options\fR ] [\fI LOGIN\fR ]
2007-10-07 17:16:25 +05:30
.SH "DESCRIPTION"
.PP
2007-10-07 17:17:22 +05:30
The
2007-10-07 17:17:01 +05:30
\fB chage\fR
2007-10-07 17:17:22 +05:30
command 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 his/her password.
2007-10-07 17:16:25 +05:30
.SH "OPTIONS"
2007-10-07 17:15:23 +05:30
.PP
2007-10-07 17:17:01 +05:30
The options which apply to the
\fB chage\fR
2007-10-07 17:16:52 +05:30
command are:
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fB \- d\fR , \fB \- \- lastday\fR \fI LAST_DAY\fR
2007-10-07 17:16:52 +05:30
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).
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fB \- E\fR , \fB \- \- expiredate\fR \fI EXPIRE_DATE\fR
2007-10-07 17:17:22 +05:30
Set the date or number of days since January 1, 1970 on which the 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:17:01 +05:30
.sp
Passing the number
\fI \- 1\fR
as the
\fI EXPIRE_DATE\fR
2007-10-07 17:16:52 +05:30
will remove an account expiration date.
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:17:01 +05:30
\fB \- h\fR , \fB \- \- help\fR
Display help message and exit.
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fB \- I\fR , \fB \- \- inactive\fR \fI INACTIVE\fR
2007-10-07 17:17:01 +05:30
Set the number of days of inactivity after a password has expired before the account is locked. The
\fI INACTIVE\fR
2007-10-07 17:16:52 +05:30
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:17:01 +05:30
.sp
Passing the number
\fI \- 1\fR
as the
\fI INACTIVE\fR
2007-10-07 17:17:22 +05:30
will remove an account's inactivity.
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fB \- l\fR , \fB \- \- list\fR
2007-10-07 17:16:52 +05:30
Show account aging information.
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fB \- m\fR , \fB \- \- mindays\fR \fI MIN_DAYS\fR
2007-10-07 17:17:33 +05:30
Set the minimum number of days between password changes to
\fI MIN_DAYS\fR . A value of zero for this field indicates that the user may change his/her password at any time.
.TP 3 n
2007-10-07 17:16:25 +05:30
\fB \- M\fR , \fB \- \- maxdays\fR \fI MAX_DAYS\fR
2007-10-07 17:17:22 +05:30
Set the maximum number of days during which a password is valid. When
2007-10-07 17:17:01 +05:30
\fI MAX_DAYS\fR
plus
\fI LAST_DAY\fR
2007-10-07 17:17:22 +05:30
is less than the current 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 in advance by use of the
2007-10-07 17:17:01 +05:30
\fB \- W\fR
2007-10-07 17:16:52 +05:30
option, which provides the user with advance warning.
2007-10-07 17:17:01 +05:30
.sp
Passing the number
\fI \- 1\fR
2007-10-07 17:17:22 +05:30
as
2007-10-07 17:17:01 +05:30
\fI MAX_DAYS\fR
2007-10-07 17:17:22 +05:30
will remove checking a password's validity.
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:17:01 +05:30
\fB \- W\fR , \fB \- \- warndays\fR \fI WARN_DAYS\fR
Set the number of days of warning before a password change is required. The
\fI WARN_DAYS\fR
2007-10-07 17:17:22 +05:30
option is the number of days prior to the password expiring that a user will be warned his/her password is about to expire.
2007-10-07 17:14:44 +05:30
.PP
2007-10-07 17:17:01 +05:30
If none of the options are selected,
\fB chage\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
\fI [ ]\fR
2007-10-07 17:16:52 +05:30
marks.
2007-10-07 17:16:25 +05:30
.SH "NOTE"
.PP
2007-10-07 17:17:01 +05:30
The
\fB chage\fR
2007-10-07 17:17:33 +05:30
program requires a shadow password file to be available.
2007-10-07 17:16:25 +05:30
.PP
2007-10-07 17:17:01 +05:30
The
\fB chage\fR
command is restricted to the root user, except for the
\fB \- l\fR
2007-10-07 17:17:22 +05:30
option, which may be used by an unprivileged user to determine when his/her password or account is due to expire.
2007-10-07 17:16:25 +05:30
.SH "FILES"
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI /etc/passwd\fR
2007-10-07 17:17:33 +05:30
User account information.
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI /etc/shadow\fR
2007-10-07 17:17:33 +05:30
Secure user account information.
2007-10-07 17:17:01 +05:30
.SH "EXIT VALUES"
.PP
The
\fB chage\fR
command exits with the following values:
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:17:01 +05:30
\fI 0\fR
success
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:17:01 +05:30
\fI 1\fR
permission denied
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:17:01 +05:30
\fI 2\fR
invalid command syntax
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:17:01 +05:30
\fI 15\fR
can't find the shadow password file
2007-10-07 17:16:25 +05:30
.SH "SEE ALSO"
.PP
2007-10-07 17:17:33 +05:30
2007-10-07 17:17:01 +05:30
\fB passwd\fR (5),
2007-10-07 17:16:52 +05:30
\fB shadow\fR (5).