nerdexam
CompTIA

XK0-004 · Question #468

A user is unable to execute the command sudo su -on a newly provisioned system. Which of the following should the Linux administrator do to allow the user to execute that command?

The correct answer is B. Add the user to the wheel group. The wheel group is the standard Linux mechanism for granting users the ability to run commands with elevated privileges via sudo.

Security

Question

A user is unable to execute the command sudo su -on a newly provisioned system. Which of the following should the Linux administrator do to allow the user to execute that command?

Options

  • AChange the user's UID to 100
  • BAdd the user to the wheel group
  • CRun restorecon to update SELinux contexts
  • DSet the execute bit on the sudo command

How the community answered

(62 responses)
  • A
    3% (2)
  • B
    89% (55)
  • C
    6% (4)
  • D
    2% (1)

Why each option

The wheel group is the standard Linux mechanism for granting users the ability to run commands with elevated privileges via sudo.

AChange the user's UID to 100

A user's UID value has no bearing on sudo privilege - sudo access is controlled by group membership and sudoers policy, not numeric UID.

BAdd the user to the wheel groupCorrect

On most Linux distributions, /etc/sudoers (or /etc/sudoers.d/) is configured by default to allow members of the 'wheel' group to execute sudo commands. Adding the user to the wheel group with 'usermod -aG wheel username' grants them the required sudo access without modifying the sudoers file directly.

CRun restorecon to update SELinux contexts

restorecon restores SELinux security contexts on files and directories; it does not affect user privilege or sudo authorization logic.

DSet the execute bit on the sudo command

The sudo binary already has the setuid execute bit set system-wide; toggling it again does not grant individual users permission to invoke it successfully.

Concept tested: Granting sudo access via wheel group membership

Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-sudo-access_configuring-basic-system-settings

Topics

#sudo#wheel group#privilege escalation#user permissions

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice