nerdexam
CompTIA

XK0-005 · Question #775

A Linux administrator is updating the password for the logcollect account. The administrator issues the following commands: #passwd -l logcollect #passwd logcollect The administrator receives a…

The correct answer is A. The logcollect account needs to be unlocked. The administrator first ran 'passwd -l logcollect', which LOCKS the account by prefixing the password hash with '!' in /etc/shadow. When a locked account's password is subsequently changed with 'passwd logcollect', the system rejects the change because the account is locked…

System Management

Question

A Linux administrator is updating the password for the logcollect account. The administrator issues the following commands:

#passwd -l logcollect #passwd logcollect The administrator receives a message that the password cannot be modified. Which of the following is most likely the issue?

Options

  • AThe logcollect account needs to be unlocked.
  • BThe logcollect account is managed by an LDAP provider.
  • CThe logcollect account must set the password.
  • DThe logcollect account is configured for nologin.

How the community answered

(41 responses)
  • A
    88% (36)
  • B
    7% (3)
  • C
    2% (1)
  • D
    2% (1)

Explanation

The administrator first ran 'passwd -l logcollect', which LOCKS the account by prefixing the password hash with '!' in /etc/shadow. When a locked account's password is subsequently changed with 'passwd logcollect', the system rejects the change because the account is locked. The fix is to unlock the account first using 'passwd -u logcollect' before attempting to set a new password. The other options are distractors: LDAP-managed accounts would produce a different error, nologin affects shell access not password changes, and the account itself cannot run passwd on its own account in this context.

Topics

#Linux user management#passwd command#Account locking#Password administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice