nerdexam
CompTIA

XK0-006 · Question #25

A Linux administrator is updating the group membership by executing the following commands: However, the group membership is not changing. Which of the following explains this issue?

The correct answer is C. The command groups was run with sudo privileges. Running groups with sudo shows the groups for the root user, not for the admin user. That’s why the output only shows root. Without sudo, groups admin (or re-login) would correctly show the updated group membership, including wheel.

Services and User Management

Question

A Linux administrator is updating the group membership by executing the following commands:

However, the group membership is not changing. Which of the following explains this issue?

Exhibit

XK0-006 question #25 exhibit

Options

  • AExecuting usermod with sudo is not permitted.
  • BUsers cannot be added to the wheel group with the usermod command.
  • CThe command groups was run with sudo privileges.
  • DThe options wheel and admin are transposed.

How the community answered

(20 responses)
  • A
    15% (3)
  • B
    5% (1)
  • C
    75% (15)
  • D
    5% (1)

Explanation

Running groups with sudo shows the groups for the root user, not for the admin user. That’s why the output only shows root. Without sudo, groups admin (or re-login) would correctly show the updated group membership, including wheel.

Topics

#usermod#group membership#sudo#user management

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice