nerdexam
CompTIA

XK0-005 · 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. To unlock a user account that has been locked due to too many failed password attempts on a Linux system, the administrator needs to reset the PAM authentication failure counter.

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

(25 responses)
  • A
    88% (22)
  • B
    8% (2)
  • D
    4% (1)

Why each option

To unlock a user account that has been locked due to too many failed password attempts on a Linux system, the administrator needs to reset the PAM authentication failure counter.

Apam_tally2 --user=user --resetCorrect

The `pam_tally2` command is a utility specifically designed to inspect and manipulate the counter of authentication failures managed by the `pam_tally2.so` PAM module. Using `--user=user` specifies the target user, and `--reset` clears their failure count, effectively unlocking their account.

Bpasswd -u user -G root

`passwd -u` is used to unlock a password, not an account locked by PAM due to failed attempts, and `-G root` is for adding a user to a group, which is irrelevant here.

Cusermod -u user -G root

`usermod -u` changes a user's UID, and `-G root` changes their primary group, neither of which unlocks an account.

Dchage -1 user=user --reset

`chage` is used to modify password expiry information; the options provided are not valid for unlocking an account.

Concept tested: Linux user account lockout management with PAM

Source: https://linux.die.net/man/8/pam_tally2

Topics

#User account management#PAM#Security administration#Linux commands

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice