nerdexam
CompTIA

XK0-005 · Question #318

A server administrator is given the hash of an account password that needs to be synchronized across all servers. Which of the following will allow the server administrator to configure the account…

The correct answer is C. Edit the shadow file. In Linux, password hashes are stored in the /etc/shadow file for security reasons, separate from user account information in /etc/passwd. To configure an account password using a given hash, one must directly edit the /etc/shadow file.

System Management

Question

A server administrator is given the hash of an account password that needs to be synchronized across all servers. Which of the following will allow the server administrator to configure the account password?

Options

  • AEdit the password file.
  • BUse the command.
  • CEdit the shadow file.
  • DUse the command.

How the community answered

(25 responses)
  • A
    4% (1)
  • B
    16% (4)
  • C
    72% (18)
  • D
    8% (2)

Why each option

In Linux, password hashes are stored in the `/etc/shadow` file for security reasons, separate from user account information in `/etc/passwd`. To configure an account password using a given hash, one must directly edit the `/etc/shadow` file.

AEdit the password file.

The `/etc/passwd` file stores user account information but does not store the password hash directly; it typically has an 'x' in the password field, indicating the hash is in `/etc/shadow`.

BUse the command.

The `passwd` command is used by users or root to change passwords, but it computes and stores the hash from a plaintext input, it does not accept a pre-computed hash.

CEdit the shadow file.Correct

The `/etc/shadow` file is where Linux systems securely store user password hashes along with other password-related information. Directly editing this file is the method to manually insert or change a password hash, assuming proper permissions and hash format.

DUse the command.

The `usermod` command is used to modify user account details, including setting an initial password, but it also takes a plaintext password that it hashes, or refers to the `/etc/shadow` file indirectly, and does not accept a raw hash.

Concept tested: Linux password hash storage

Source: https://man7.org/linux/man-pages/man5/shadow.5.html

Topics

#User Management#Password Security#Linux System Files

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice