1CHAGE(1)                         User Commands                        CHAGE(1)
2
3
4

NAME

6       chage - change user password expiry information
7

SYNOPSIS

9       chage [options] LOGIN
10

DESCRIPTION

12       The chage command changes the number of days between password changes
13       and the date of the last password change. This information is used by
14       the system to determine when a user must change their password.
15

OPTIONS

17       The options which apply to the chage command are:
18
19       -d, --lastday LAST_DAY
20           Set the number of days since January 1st, 1970 when the password
21           was last changed. The date may also be expressed in the format
22           YYYY-MM-DD (or the format more commonly used in your area). If the
23           LAST_DAY is set to 0 the user is forced to change his password on
24           the next log on.
25
26       -E, --expiredate EXPIRE_DATE
27           Set the date or number of days since January 1, 1970 on which the
28           user's account will no longer be accessible. The date may also be
29           expressed in the format YYYY-MM-DD (or the format more commonly
30           used in your area). A user whose account is locked must contact the
31           system administrator before being able to use the system again.
32
33           For example the following can be used to set an account to expire
34           in 180 days:
35
36                        chage -E $(date -d +180days +%Y-%m-%d)
37
38
39           Passing the number -1 as the EXPIRE_DATE will remove an account
40           expiration date.
41
42       -h, --help
43           Display help message and exit.
44
45       -i, --iso8601
46           When printing dates, use YYYY-MM-DD format.
47
48       -I, --inactive INACTIVE
49           Set the number of days of inactivity after a password has expired
50           before the account is locked. The INACTIVE option is the number of
51           days of inactivity. A user whose account is locked must contact the
52           system administrator before being able to use the system again.
53
54           Passing the number -1 as the INACTIVE will remove an account's
55           inactivity.
56
57       -l, --list
58           Show account aging information.
59
60       -m, --mindays MIN_DAYS
61           Set the minimum number of days between password changes to
62           MIN_DAYS. A value of zero for this field indicates that the user
63           may change their password at any time.
64
65       -M, --maxdays MAX_DAYS
66           Set the maximum number of days during which a password is valid.
67           When MAX_DAYS plus LAST_DAY is less than the current day, the user
68           will be required to change their password before being able to use
69           their account. This occurrence can be planned for in advance by use
70           of the -W option, which provides the user with advance warning.
71
72           Passing the number -1 as MAX_DAYS will remove checking a password's
73           validity.
74
75       -R, --root CHROOT_DIR
76           Apply changes in the CHROOT_DIR directory and use the configuration
77           files from the CHROOT_DIR directory. Only absolute paths are
78           supported.
79
80       -W, --warndays WARN_DAYS
81           Set the number of days of warning before a password change is
82           required. The WARN_DAYS option is the number of days prior to the
83           password expiring that a user will be warned their password is
84           about to expire.
85
86       If none of the options are selected, chage operates in an interactive
87       fashion, prompting the user with the current values for all of the
88       fields. Enter the new value to change the field, or leave the line
89       blank to use the current value. The current value is displayed between
90       a pair of [ ] marks.
91

NOTE

93       The chage program requires a shadow password file to be available.
94
95       The chage program will report only the information from the shadow
96       password file. This implies that configuration from other sources (e.g.
97       LDAP or empty password hash field from the passwd file) that affect the
98       user's login will not be shown in the chage output.
99
100       The chage program will also not report any inconsistency between the
101       shadow and passwd files (e.g. missing x in the passwd file). The pwck
102       can be used to check for this kind of inconsistencies.
103
104       The chage command is restricted to the root user, except for the -l
105       option, which may be used by an unprivileged user to determine when
106       their password or account is due to expire.
107

CONFIGURATION

109       The following configuration variables in /etc/login.defs change the
110       behavior of this tool:
111

FILES

113       /etc/passwd
114           User account information.
115
116       /etc/shadow
117           Secure user account information.
118

EXIT VALUES

120       The chage command exits with the following values:
121
122       0
123           success
124
125       1
126           permission denied
127
128       2
129           invalid command syntax
130
131       15
132           can't find the shadow password file
133

SEE ALSO

135       passwd(5), shadow(5).
136
137
138
139shadow-utils 4.12.3               11/29/2022                          CHAGE(1)
Impressum