- List password information for the user:chage -l [user_name]- Enable password expiration in 10 days:sudo chage -M  [user_name]- Disable password expiration:sudo chage -M -1 [user_name]- Set account expiration date:sudo chage -E [YYYY-MM-DD]- Force user to change password on next log in:sudo chage -d 0
The options which apply to the chage command are:
-d, --lastday LAST_DAY
-E, --expiredate EXPIRE_DATE
Passing the number -1 as the EXPIRE_DATE will remove an account expiration date.
-I, --inactive INACTIVE
Passing the number -1 as the INACTIVE will remove an account's inactivity.
-m, --mindays MIN_DAYS
-M, --maxdays MAX_DAYS
Passing the number -1 as MAX_DAYS will remove checking a password's validity.
-R, --root CHROOT_DIR
-W, --warndays WARN_DAYS
If none of the options are selected, chage 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 [ ] marks.
The chage program requires a shadow password file to be available.
The chage command is restricted to the root user, except for the -l option, which may be used by an unprivileged user to determine when his/her password or account is due to expire.
The following configuration variables in /etc/login.defs change the behavior of this tool:
The chage command exits with the following values: