chage
Quick Reference
Command Name:
chage
Category:
user management
Platform:
linux
Basic Usage:
Common Use Cases
- 1
Password policy management
Set password expiration and aging policies
- 2
User account security
Configure security settings for user accounts
- 3
System administration
Manage user account security policies
- 4
Compliance management
Enforce password policies for regulatory compliance
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:
chage -l username
chage -m 7 username
chage -M 90 username
chage -E 2023-12-31 username