XK0-004 · Question #169
A user has been locked out of an account due to too many failed password attempts. Which of the following commands will unlock the user's account?
The correct answer is A. pam_tally2 --user=user --reset. pam_tally2 is the PAM utility used to display and reset the failed login attempt counter maintained by the pam_tally2 module, which is what locks accounts after excessive failures.
Question
A user has been locked out of an account due to too many failed password attempts. Which of the following commands will unlock the user's account?
Options
- Apam_tally2 --user=user --reset
- Bpasswd -u user -G root
- Cusermod -u user -G root
- Dchage -1 user=user --reset
How the community answered
(37 responses)- A89% (33)
- B3% (1)
- C3% (1)
- D5% (2)
Why each option
pam_tally2 is the PAM utility used to display and reset the failed login attempt counter maintained by the pam_tally2 module, which is what locks accounts after excessive failures.
pam_tally2 --user=<username> --reset resets the failed authentication attempt count tracked by the pam_tally2 PAM module back to zero, which is the direct mechanism for unlocking an account that was locked due to too many failed password attempts.
passwd -u unlocks a password that was explicitly locked with passwd -l, not a PAM tally lockout; additionally, -G is not a valid flag for passwd.
usermod -u modifies the numeric user ID and -G changes supplementary group membership; neither flag addresses a PAM tally lockout.
chage manages password expiry and aging policies and has no mechanism to reset a pam_tally2 failure counter; the syntax provided is also invalid.
Concept tested: Resetting PAM failed login counter to unlock account
Source: https://linux.die.net/man/8/pam_tally2
Topics
Community Discussion
No community discussion yet for this question.