chage
Overview
The chage
command changes user password expiry information. It allows administrators to manage password aging and account expiration policies.
Syntax
chage [options] LOGIN
Common Options
Option | Description |
---|---|
-d, --lastday LAST_DAY |
Set last password change date |
-E, --expiredate EXPIRE_DATE |
Set account expiration date |
-I, --inactive INACTIVE |
Set password inactive days |
-l, --list |
Show account aging info |
-m, --mindays MIN_DAYS |
Set minimum days between changes |
-M, --maxdays MAX_DAYS |
Set maximum days between changes |
-W, --warndays WARN_DAYS |
Set expiry warning days |
-h, --help |
Display help |
Key Use Cases
- Password aging
- Account expiration
- Security policy
- User management
- Compliance
Examples with Explanations
Example 1: View Info
chage -l username
Show account aging information
Example 2: Set Expiry
chage -E 2024-12-31 username
Set account expiration date
Example 3: Password Age
chage -M 90 -m 7 -W 7 username
Set password age policy
Understanding Output
Account aging information: - Last password change - Password expires - Password inactive - Account expires - Minimum age - Maximum age - Warning period
Common Usage Patterns
Force password change:
chage -d 0 username
Set expiry policy:
chage -M 60 -W 7 username
Remove expiration:
chage -M -1 username
Security Considerations
- Password aging
- Account expiration
- Warning periods
- Inactive accounts
- Policy compliance
Additional Resources
Best Practices
- Regular review
- Policy documentation
- Compliance checks
- User notification
- Audit logging
Policy Management
- Password lifetime
- Account validity
- Warning periods
- Inactivity rules
- Expiry dates
Common Tasks
- Password aging
- Account expiry
- Policy updates
- User notifications
- Compliance checks