nerdexam
CompTIA

SK0-004 · Question #734

An administrator is attempting to run the following command on a Linux system: sudo apt-get However, the administrator is presented with an error stating the required permissions to run update. the…

The correct answer is A. /etc/sudoers. The visudo command is specifically designed to safely edit the /etc/sudoers file, which controls which users and groups are permitted to run commands with elevated privileges via sudo.

Server administration

Question

An administrator is attempting to run the following command on a Linux system: sudo apt-get However, the administrator is presented with an error stating the required permissions to run update. the apt-get utility are not present. Which of the following files should be modified using the visudo command?

Options

  • A/etc/sudoers
  • B/etc/groups
  • C/etc/passwd
  • D/etc/named.conf

How the community answered

(33 responses)
  • A
    94% (31)
  • B
    3% (1)
  • C
    3% (1)

Why each option

The visudo command is specifically designed to safely edit the /etc/sudoers file, which controls which users and groups are permitted to run commands with elevated privileges via sudo.

A/etc/sudoersCorrect

The /etc/sudoers file defines sudo access policies, including which users can run which commands as root or other users. The visudo command opens this file with syntax validation to prevent saving a malformed sudoers file that could lock out all administrative access. To grant the administrator permission to run apt-get with sudo, an appropriate entry must be added to /etc/sudoers using visudo.

B/etc/groups

The /etc/groups file (typically /etc/group) manages group memberships and does not control sudo command execution permissions.

C/etc/passwd

The /etc/passwd file stores user account information such as usernames, UIDs, and shell paths, but does not define sudo privileges.

D/etc/named.conf

The /etc/named.conf file is the configuration file for the BIND DNS server and has no relation to user privilege escalation or sudo permissions.

Concept tested: Linux sudo permissions configuration via visudo and /etc/sudoers

Source: https://www.sudo.ws/docs/man/sudoers.man/

Topics

#sudo#sudoers file#Linux permissions#visudo

Community Discussion

No community discussion yet for this question.

Full SK0-004 Practice