nerdexam
CompTIA

XK0-005 · Question #567

A systems administrator wants to be sure the sudo rules just added to /etc/sudoers are valid. Which of the following commands can be used for this task?

The correct answer is A. visudo -c. The command visudo -c can be used to check the validity of the sudo rules in the /etc/sudoers file. The visudo command is a tool for editing and validating the /etc/sudoers file, which defines the rules for the sudo command. The -c option checks the syntax and logic of the file…

System Management

Question

A systems administrator wants to be sure the sudo rules just added to /etc/sudoers are valid. Which of the following commands can be used for this task?

Options

  • Avisudo -c
  • Btest -f /etc/sudoers
  • Csudo vi check
  • Dcat /etc/sudoers | tee test

How the community answered

(56 responses)
  • A
    91% (51)
  • B
    5% (3)
  • C
    2% (1)
  • D
    2% (1)

Explanation

The command visudo -c can be used to check the validity of the sudo rules in the /etc/sudoers file. The visudo command is a tool for editing and validating the /etc/sudoers file, which defines the rules for the sudo command. The -c option checks the syntax and logic of the file and reports any errors or warnings. The command visudo -c will verify the sudo rules and help the administrator avoid any mistakes.

Topics

#sudo#visudo#system administration#configuration management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice