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.
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)- A3% (2)
- B89% (55)
- C6% (4)
- D2% (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.
A user's UID value has no bearing on sudo privilege - sudo access is controlled by group membership and sudoers policy, not numeric UID.
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.
restorecon restores SELinux security contexts on files and directories; it does not affect user privilege or sudo authorization logic.
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
Community Discussion
No community discussion yet for this question.