Stop user account lockouts from driving you crazy
User & Group Management
Stop user account lockouts from driving you crazy
🧩 The Challenge
You know that feeling when a developer is blocked because they fat-fingered their password six times and locked their own account? It’s a total waste of time to SSH in just to run a manual unlock command for someone else.
💡 The Fix
Use the user-modify command with the unlock flag to clear their failed attempts without messing with their actual password or account expiration settings. You’ll save yourself from being the bottleneck for every typo they make.
usermod -U username
⚙️ Why It Works
Passing the capital U flag clears the locked status bit in the shadow file, which is usually the only thing standing between a frustrated user and their terminal. It doesn’t touch their password hash or group memberships, so it’s the safest way to reset them.
🚀 Pro-Tip: Run faillog -u username first to see exactly how many times they failed and where it’s happening.
Linux Tips & Tricks | © ngelinux.com | 10/27/2026
