Stop wondering if your local accounts are getting stale

User & Group Management

Stop wondering if your local accounts are getting stale

🧩 The Challenge

Finding out which of your system users haven’t touched the keyboard in a year is a chore. Usually, people end up grepping through logs, but that’s a mess if you’ve got log rotation eating your history.

💡 The Fix

You can actually query the account aging information directly from the shadow file without needing to parse anything manually. It’s a clean way to find “zombie” accounts that should have been nuked ages ago.

chage -l username

⚙️ Why It Works

By using the list flag with the chage utility, you pull the password aging policy and the last login date stored in /etc/shadow. It saves you from writing custom scripts just to audit who hasn’t logged in since the last major release.

🚀 Pro-Tip: Pipe this into a loop to check all users with a UID over 1000 so you can clean out those forgotten dev accounts.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted