Security
A junior administrator must let members of the webops group run only systemctl restart nginx as root. The rule must be syntax-checked before it takes effect so that a typo cannot break sudo for everyone. Which method is BEST?
Show the answer
Correct answerA. Run visudo -f /etc/sudoers.d/webops and add the rule there
visudo locks the file and validates syntax before saving, and a drop-in under /etc/sudoers.d keeps the change separate from the main file. A plain editor skips the validation, so a typo can break sudo for all users.