[sudo-users] editiing the sudoers file

Todd C. Miller Todd.Miller at courtesan.com
Fri Jun 3 08:49:18 EDT 2011


On Thu, 02 Jun 2011 19:17:19 PDT, kz0twk-unix at yahoo.com wrote:

> i was not aware of the need to  edit the sudoers file with visudo
> program and did so with "vi /etc/sudoers" as root. could i have
> damaged the file by edit ing it in this manner?

If you use visudo to edit the sudoers file, it will check the syntax
and not let you save a file that has errors.  It also makes sure
that the file owner and mode are correct and that no one else is
editing the file at the same time.

You can also use it to simply check the syntax of the sudoers file
by running:

    # visudo -c

If that does not show any errors then everything should be fine.

 - todd



More information about the sudo-users mailing list