nerdexam
CompTIA

LX0-104 · Question #508

Which of the following configurations file does sudo read when determining if a user is permitted to run applications with root privileges?

The correct answer is D. /etc/sudoers. sudo determines user permissions for running commands as root by consulting the /etc/sudoers file, which defines who can run what commands on which hosts.

Security

Question

Which of the following configurations file does sudo read when determining if a user is permitted to run applications with root privileges?

Options

  • A/etc/audit.conf
  • B/etc/shadow
  • C/etc/sudo.conf
  • D/etc/sudoers

How the community answered

(36 responses)
  • B
    8% (3)
  • C
    3% (1)
  • D
    89% (32)

Why each option

`sudo` determines user permissions for running commands as root by consulting the `/etc/sudoers` file, which defines who can run what commands on which hosts.

A/etc/audit.conf

`/etc/audit.conf` is a configuration file for the Linux Audit system, used for security auditing, not `sudo` permissions.

B/etc/shadow

`/etc/shadow` stores encrypted user passwords and password aging information, not `sudo` access rules.

C/etc/sudo.conf

`/etc/sudo.conf` is a configuration file for the `sudo` frontend itself, used to specify plugin paths or debug settings, but it does not contain user-specific permission rules.

D/etc/sudoersCorrect

The `/etc/sudoers` file is the primary configuration file for the `sudo` command, specifying which users or groups are allowed to execute commands as another user (typically root) and with what restrictions. This file must be edited using the `visudo` command to ensure correct syntax and prevent system lockout.

Concept tested: sudo configuration file

Source: https://linux.die.net/man/5/sudoers

Topics

#sudo#sudoers#privilege escalation#access control

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice