Q: 3
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
Discussion
Option A. that's the standard way to check for syntax issues in /etc/sudoers after editing.
Option A
A or D here, honestly depends if we're talking strict syntax check or just reviewing the file visually. Not 100 percent sure.
Makes sense to me that A is the right call, since visudo -c actually checks the syntax for errors, not just whether the file exists or what's inside. None of the others do a real validation. Pretty sure it's A but not 100% if there's an edge case I'm missing.
Option A is the pick. I ran into something really close on a mock and the explanation confirmed it: visudo -c checks the sudoers file for syntax errors. The others just check if the file exists or display contents, not validate rules. Pretty sure A is right here, but let me know if anyone's seen different on live exams.
A imo, seen similar question in practice sets.
I don’t think it’s A. B could make sense if the admin just needs to see if /etc/sudoers exists, right?
A is it
I don’t think D works for checking validity, it just outputs the file. A is what actually verifies sudoers syntax, so mistakes won’t lock out sudo. I’ve seen similar questions and visudo -c is always the safe choice. If anyone has a counter example in practical use, definitely curious to hear, but I’m pretty sure A here.
A, none of the others actually validate syntax.
Be respectful. No spam.