ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 81 - XK0-005 discussion

Report
Export

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?

A.
visudo -c
Answers
A.
visudo -c
B.
test -f /etc/sudoers
Answers
B.
test -f /etc/sudoers
C.
sudo vi check
Answers
C.
sudo vi check
D.
cat /etc/sudoers | tee test
Answers
D.
cat /etc/sudoers | tee test
Suggested answer: A

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. This is the correct command to use for this task. The other options are incorrect because they either do not check the validity of the file (test, sudo, or cat) or do not exist (sudo vi check). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 546.

asked 02/10/2024
Kelvin Ogwu
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first