XK0-005 · Question #591
A Linux administrator provisioned a new web server with custom administrative permissions for certain users. The administrator receives a report that user1 is unable to restart the Apache web…
The correct answer is D. Webadmin should be listed as a group in the custom.conf file. To allow a specific user to manage a service with sudo while maintaining least privilege, sudoers configuration should grant specific permissions to a relevant group.
Question
A Linux administrator provisioned a new web server with custom administrative permissions for certain users. The administrator receives a report that user1 is unable to restart the Apache web service on this server. The administrator reviews the following output:
Which of the following would most likely resolve the issue while maintaining a least privilege security model?
Options
- AUser1 should be added to the wheel group to manage the service.
- BUser1 should have "NOPASSWD:" after the "ALL=" in the custom.conf.
- CThe wheel line in the custom.conf file should be uncommented.
- DWebadmin should be listed as a group in the custom.conf file.
How the community answered
(22 responses)- A5% (1)
- B5% (1)
- C14% (3)
- D77% (17)
Why each option
To allow a specific user to manage a service with `sudo` while maintaining least privilege, `sudoers` configuration should grant specific permissions to a relevant group.
Adding user1 to the wheel group typically grants broad sudo access, which often goes against the least privilege security model if user1 only needs to manage Apache.
Adding NOPASSWD: would remove the password prompt for user1 when using sudo, but it does not grant the underlying permission to manage the Apache service if it's not already defined.
Uncommenting the wheel line in custom.conf would enable broad sudo access for members of the wheel group, which contradicts the least privilege principle if user1 only needs to manage Apache.
If `custom.conf` is a `sudoers` file for custom administrative permissions, listing `Webadmin` as a group and adding `user1` to it, along with a `sudo` rule for restarting Apache, grants the specific privilege without broad root access. This aligns with the least privilege principle by granting only the required permission.
Concept tested: Sudoers configuration for specific service management
Source: https://www.sudo.ws/docs/sudoers_man/
Topics
Community Discussion
No community discussion yet for this question.