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…
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)- A91% (51)
- B5% (3)
- C2% (1)
- D2% (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
Community Discussion
No community discussion yet for this question.