1. When to use it
Useful in environments where you must enforce an explicit password policy even without external directory solutions.
chage | password aging | login.defs | users | policy
2. Base setup
chage -M 90 -m 7 -W 14 alice
chage -l alice
passwd -S alice
Adjust host names, IPs, interfaces, paths, and versions to the real system before making the change persistent.
3. Quick verification
chage -l alice
grep '^PASS_MAX_DAYS' /etc/login.defs
grep '^PASS_WARN_AGE' /etc/login.defs
Confirm that the output matches the expected state before considering the intervention complete.
4. Operational notes
Do not apply the same policy to service accounts blindly: breaking an app due to password expiry can be worse than the original risk.
Quick checklist
[ ] Steps completed\n[ ] Config updated\n[ ] Tests executed\n[ ] Rollback ready\n[ ] Logs checked