๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

๐Ÿ’ก User Management August 13, 2026 10

Linux Command: chage

Change user password expiry information

Terminal โ€” User Management
Command
$ sudo chage -l jdoe
Output
Last password change: Jan 01, 2024 Password expires: Apr 01, 2024 Account expires: never

chage changes user password aging information. It manages password expiration policies including maximum age, minimum age, warning days, and account expiration. chage is essential for enforcing password policies, meeting compliance requirements (PCI-DSS, HIPAA), and managing contractor/temporary accounts with automatic expiration. chage interacts with the shadow password file (/etc/shadow) and requires root privileges to modify other users' settings. Users can view their own aging info with chage -l.

Syntax

chage [OPTION]... USERNAME

Key Options

  • -l โ€” List password aging info for user
  • -M โ€” Maximum days between password changes
  • -m โ€” Minimum days between password changes
  • -W โ€” Warning days before password expires
  • -E โ€” Set account expiration date
  • -d โ€” Set date of last password change

Examples

View password info

sudo chage -l jdoe

Output: Last password change: Jan 01, 2024 Password expires: Apr 01, 2024 Account expires: never

Set 90-day password policy

sudo chage -M 90 -m 7 -W 14 jdoe

Force password change

sudo chage -d 0 jdoe

Pro Tips

  • For PCI-DSS: chage -M 90 -m 1 -W 14 -I 30 user. This sets 90-day expiry, 1-day minimum, 14-day warning, 30-day inactive lock.
  • chage -d 0 forces password change at next login. chage -E date expires the entire account.
  • Users can run chage -l username to see their own password aging info. This is by design for self-service.

Learn more: Full chage reference โ†’

Share this tip