nerdexam
CompTIA

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.

Security

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)
  • A
    89% (33)
  • B
    3% (1)
  • C
    3% (1)
  • D
    5% (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.

Apam_tally2 --user=user --resetCorrect

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.

Bpasswd -u user -G root

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.

Cusermod -u user -G root

usermod -u modifies the numeric user ID and -G changes supplementary group membership; neither flag addresses a PAM tally lockout.

Dchage -1 user=user --reset

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

#pam_tally2#account lockout#PAM#failed login reset

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice