Interview Prep/Linux/SSH, sudo and authentication

Users get locked out after a few wrong passwords and the lock persists: `pam_faillock(sshd:auth): Consecutive login failures for user alice account temporarily locked`.

IntermediateTroubleshootingSSH, sudo and authentication
Answer

Likely causes → pam_faillock (RHEL 8/9, newer Ubuntu) locking after N failures; automated scripts with an old password can trigger it repeatedly.

Diagnose →

sudo faillock --user alice
grep -Ev '^#|^$' /etc/security/faillock.conf

Fix → sudo faillock --user alice --reset. Find and fix the source of failures (a script, a mounted share using old credentials).

Prevent → Set reasonable deny and unlock_time in faillock.conf; use keys for automation.

All Linux questions Roadmap: Linux

More on SSH, sudo and authentication