User & Group Management
Stop letting locked accounts hide in your shadow file
đź§© The Challenge
Dealing with a dozen expired service accounts that are still technically active but shouldn’t be is a headache, especially when you can’t tell if a password is actually locked or just ancient. It is maddening to dig through /etc/shadow manually and try to parse exclamation points.
đź’ˇ The Fix
Use a specific switch with the change command to pull the password aging status right out into a human-readable list. You’ll instantly see which accounts have been sitting idle for years without having to decrypt anything.
chage -l username
⚙️ Why It Works
This utility parses the shadow file entry for the specified user and displays the expiration dates and password constraints in a clean format. It saves you from manual character counting in files that were never meant for human eyes.
🚀 Pro-Tip: Pipe this to grep if you are doing a site-wide audit of stale accounts.
Linux Tips & Tricks | © ngelinux.com | 9/27/2026
