Linux chage command - change user password expiry information.

To view current password expiry date info for a user, use the -l command-line option.

chage -l [USERNAME]

$ chage -l ec2-user
Last password change                                    : May 31, 2020
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7


       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.

$ chage --help
Usage: chage [options] LOGIN

Options:
  -d, --lastday LAST_DAY        set date of last password change to LAST_DAY
  -E, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
  -h, --help                    display this help message and exit
  -I, --inactive INACTIVE       set password inactive after expiration
                                to INACTIVE
  -l, --list                    show account aging information
  -m, --mindays MIN_DAYS        set minimum number of days before password
                                change to MIN_DAYS
  -M, --maxdays MAX_DAYS        set maximim number of days before password
                                change to MAX_DAYS
  -R, --root CHROOT_DIR         directory to chroot into
  -W, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS



Comments