chage
Quick Reference
Command Name:
chage
Category:
user management
Platform:
linux
Basic Usage:
Common Use Cases
Syntax
chage [options] LOGIN
Options
Option | Description |
---|---|
-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 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 maximum number of days before password change to MAX_DAYS |
-R, --root CHROOT_DIR | Apply changes in CHROOT_DIR directory |
-W, --warndays WARN_DAYS | Set expiration warning days to WARN_DAYS |
Examples
How to Use These Examples
The examples below show common ways to use the chage
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
# Display account aging information for a user chage -l username
Advanced Examples:
# Force password change on next login chage -d 0 username