I understand that if you want to modify who can use sudo and what they can do with it that you should use visudo. I know I'm not suppose to directly modify the sudoers file myself. What is it that visudo does that directly modifying the file doesn't do? What can go wrong?
|
If you use a plain editor, mess up the syntax, and save... Additionally it ensures that the edits will be one atomic operation. This locking is important if you need to ensure nobody else can mess up your carefully considered config changes. For editing other files as root besides |
|||||||
|
|
From the visudo man page:
Also check this answer from serverfault. |
|||
|
|