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

  • -l

    Shows the account's aging information.

  • -M días

    Maximum number of days the password can be used.

  • -m días

    Minimum number of days between password changes.

  • -W días

    Days of warning before the password expires.

  • -E fecha

    Date the account expires (YYYY-MM-DD); -1 removes it.

  • -d fecha

    Date of the last change; 0 forces a change at the next login.

  • -I días

    Grace days after expiry before the account is locked.

Usage examples

  • chage -l ana

    Shows when ana's password expires (anyone can query their own).

  • sudo chage -M 90 ana

    Forces ana to change her password every 90 days.

  • sudo chage -d 0 ana

    Forces ana to change her password at her next login.

  • sudo chage -E 2026-12-31 ana

    Makes 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.

Related commands