chage
Linux · Users and permissions · reference only
What it does
Shows and changes an account's password aging policy: maximum days, warnings and expiry date.
Syntax
chage [opciones] usuario
Options and parameters
-lShows the account's aging information.
-M díasMaximum number of days the password can be used.
-m díasMinimum number of days between password changes.
-W díasDays of warning before the password expires.
-E fechaDate the account expires (YYYY-MM-DD); -1 removes it.
-d fechaDate of the last change; 0 forces a change at the next login.
-I díasGrace days after expiry before the account is locked.
Usage examples
chage -l anaShows when ana's password expires (anyone can query their own).
sudo chage -M 90 anaForces ana to change her password every 90 days.
sudo chage -d 0 anaForces ana to change her password at her next login.
sudo chage -E 2026-12-31 anaMakes ana's account expire on 31 December 2026.
Notes and common mistakes
- Only root can view or change other users' data.
- The values are stored in /etc/shadow.