LFCS · Question #233
Which of the following configuration files does sudo read when determining if a user is permitted to run applications with root privileges?
The correct answer is C. /etc/sudoers. The /etc/sudoers file is the primary configuration file that determines which users are allowed to execute commands with root privileges via the sudo command.
Question
Options
- A/etc/groups
- B/etc/passwd
- C/etc/sudoers
- D/etc/sudo.conf
How the community answered
(20 responses)- A5% (1)
- B5% (1)
- C90% (18)
Why each option
The `/etc/sudoers` file is the primary configuration file that determines which users are allowed to execute commands with root privileges via the `sudo` command.
`/etc/groups` defines user groups, but it does not specify `sudo` permissions for those groups.
`/etc/passwd` stores basic user account information, but it does not contain `sudo` permissions.
The `/etc/sudoers` file contains the rules that define who can run what commands with `sudo` and under what conditions. This file is parsed by the `sudo` command to enforce privilege elevation policies.
`/etc/sudo.conf` is a general configuration file for `sudo` and its plugins, but the specific user permission rules are defined in `/etc/sudoers`.
Concept tested: `sudo` configuration file location
Source: https://man7.org/linux/man-pages/man5/sudoers.5.html
Topics
Community Discussion
No community discussion yet for this question.