Site icon New Generation Enterprise Linux

Stop account lockout surprises by checking max days

User & Group Management

Stop account lockout surprises by checking max days

🧩 The Challenge

Dealing with a service account that suddenly stops working because of an obscure password expiration policy is a headache nobody needs. You think the auth config is fine, but the user shadow file is secretly ticking down like a bomb.

💡 The Fix

Use chage to display all the aging information for an account so you can see exactly when the password or the account itself is set to expire. It takes two seconds and saves you from hunting through PAM logs in the middle of a Friday deployment.

chage -l username

⚙️ Why It Works

This utility pulls the values directly from /etc/shadow, showing you the exact last change date and the number of days remaining before the system forces a change or locks the account. Most people forget these settings exist until the account is already locked out.

🚀 Pro-Tip: Pipe it into grep to check a whole server of accounts at once if you’re feeling paranoid.

Linux Tips & Tricks | © ngelinux.com | 11/16/2026

0 0 votes
Article Rating
Exit mobile version