Which Users Have Root-Level Command-Line Access? XK0-005 Audit Question

A Linux administrator generated a list of users who have root-level command-line access to the Linux server to meet an audit requirement. The administrator analyzes the following /etc/passwd and /etc/sudoers files: Which of the following users, in addition to the root user, should be listed in the audit report as having root-level command-line access? (Choose two.) - image

  1. Carl Source Reference Answer
  2. Lee Source Reference Answer
  3. Mallory
  4. Eve
  5. Bob

Community Votes

AB
100%

100% of anonymous learners picked answer AB. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests your ability to distinguish between UID 0, sudo entries, home directory placement, and limited sudo commands—Carl's UID 0 grants root equivalence, while Mallory's root home directory is a distractor.

In the CompTIA XK0-005 exam, candidates must identify users with root-level command-line access from /etc/passwd and /etc/sudoers. The community consensus is that Carl (UID 0) and Lee (full sudo privileges) are the correct choices.

A common mistake is selecting Mallory because her home directory is /, but home directory location does not confer root privileges. Another mistake is selecting Bob for having a sudo entry, but his NOPASSWD:SYSADMIN entry only grants access to specific commands.

Community Discussion (6 comments)

HappyDay030303 👍 2 Selected: AB
A. Carl has a UID of 0, same as root B. Lee has full SUDO access, same as root
044f354 👍 1 Selected: AB
[from /etc/passwd] root :x:0:0::/home/root:/bin/bash root has a UID of 0 carl :x:0:503::/home/carl:/bin/sh Carl also has a UID of 0, which gives him root-level access equivalent to the root user. [from /etc/sudoers] lee ALL = (ALL) ALL Lee is granted full root access through the sudo command
IFBBPROSALCEDO 👍 1 Selected: BE
B (Lee) and E (Bob) are correct because: - Lee has the entry lee ALL = (ALL) ALL in the /etc/sudoers file, granting full root-level command-line access. - Bob has the entry bob ALL = NOPASSWD: SYSADMIN, allowing root-level access to the /usr/sbin/tcpdump command without requiring a password.
Monty97 👍 3 Selected: AB
Answer is Carl, as they share the same ID as the root, and Lee has the sudoers privileges. The confusion is that Mallory has the root directory listed as her home directory. However, this does not necessarily mean she has root level command line access, but she can view and manipulate files and directories within.
makuziker 👍 3 Selected: AB
I think it is AB. Lee has an entry in sudoers, allowing him to run any command on the system lee ALL=(ALL) ALL Carl has the userId 0, the same as root. That sounds like a terrible idea to me, he should NOT share the same userId as root. That is like logging into the system as root user. Nothing here indicates to me that Mallory has admin level access.
riddie78 👍 1
NOT UNDERSTANDING THE PROVIDED ANSWERS ON THIS ONE... can anyone explain?

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Carl has a UID of 0 in /etc/passwd, identical to root, which gives him full root-level command-line access regardless of his home directory or shell. Lee has the line lee ALL=(ALL) ALL in /etc/sudoers, granting him permission to run any command as any user, including root. Community comments with high likes confirm this reasoning, noting that sharing the root UID is equivalent to logging in as root and that Lee's sudoers entry grants full sudo privileges.

Why the Other Options Are Wrong

Mallory has / as her home directory, but this does not grant any administrative rights; she can only view and manipulate files within that directory if her permissions allow. Bob has a sudoers entry bob ALL=NOPASSWD: SYSADMIN, which restricts him to running only commands in the SYSADMIN group (e.g., tcpdump) without a password, not full root-level command-line access. Eve has no entry in either file indicating any special privileges.

Community Comment Notes

A highly upvoted comment explains that Carl shares the same UID as root and Lee has sudoers privileges, while Mallory's root home directory is a trap because it does not imply root access. Another comment notes that Bob's NOPASSWD:SYSADMIN entry only gives specific command access, not full root-level CLI access. One user initially voted BE but later analysis and the majority vote confirm AB as the correct answer.

Official Reference

Exam Strategy

Remember that root-level command-line access is granted either by UID 0 or by a sudo entry that allows running all commands as root. Watch for distractors like a user whose home directory is / or a sudo entry restricted to specific commands.

Related Analysis

← Back to XK0-005 Study Guide