chage
command.
Shadow passwords must be enabled to use chage
chage
command. For more information, see Section 4.1.2, “Shadow Passwords”.
root
:
chage
[options] username
chage
command is followed directly by a username (that is, when no command line options are specified), it displays the current password aging values and allows you to change them interactively.
Table 4.4. chage command line options
Option | Description |
---|---|
-d days | Specifies the number of days since January 1, 1970 the password was changed. |
-E date | Specifies the date on which the account is locked, in the format YYYY-MM-DD. Instead of the date, the number of days since January 1, 1970 can also be used. |
-I days | Specifies the number of inactive days after the password expiration before locking the account. If the value is 0 , the account is not locked after the password expires. |
-l | Lists current account aging settings. |
-m days | Specify the minimum number of days after which the user must change passwords. If the value is 0 , the password does not expire. |
-M days | Specify the maximum number of days for which the password is valid. When the number of days specified by this option plus the number of days specified with the -d option is less than the current day, the user must change passwords before using the account. |
-W days | Specifies the number of days before the password expiration date to warn the user. |
root
:
passwd
username
passwd
-d
username
Avoid using null passwords whenever possible
root
:
chage
-d
0
username