-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux chage Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to chage on Linux, covering Arch Linux, CachyOS, and other distributions including password expiration, account aging, and user account policies.
chage changes user password aging information.
Uses:
- Password expiration: Set password expiry
- Account aging: Configure account lifetime
- Password policies: Enforce security policies
- Account management: Manage account settings
Why it matters:
- Security: Force password changes
- Compliance: Meet security requirements
- Account management: Control account lifecycle
Check user:
# Show password aging info
sudo chage -l username
# Shows:
# - Last password change
# - Password expires
# - Password inactive
# - Account expires
# - Minimum days
# - Maximum days
# - Warning daysInteractive setup:
# Interactive configuration
sudo chage username
# Follow promptsPassword expiry:
# Set password to expire in 90 days
sudo chage -M 90 username
# -M: Maximum daysRequire change:
# Force password change on next login
sudo chage -d 0 username
# User must change passwordSet expiry:
# Account expires on date
sudo chage -E 2024-12-31 username
# Or days from now
sudo chage -E $(date -d "+90 days" +%Y-%m-%d) usernameAccount inactivity:
# Lock after inactive days
sudo chage -I 30 username
# Lock after 30 days inactiveCheck user:
# Verify user exists
id username
# Check current settings
sudo chage -l usernameThis guide covered chage usage, password expiration, and account aging for Arch Linux, CachyOS, and other distributions.
- passwd Guide - Password management
- User and Groups - User management
- PAM Guide - Authentication
-
chage Documentation:
man chage
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.