[sudo-users] visudo

Bob Proulx bob at proulx.com
Fri May 26 12:29:37 EDT 2006

Micha wrote:
> i'm maintaining a small mixed homenet where i am the very only
> one with access to router or the server box. This is no production 
> system, only private office users with some centralized tasks.
> There's a question i have for some years now, and can't figure
> it out. I use to do administration as root, and did edit the sudoers
> file with emacs, nano, and midnight commander with no problems.
> Can you tell me why should i use visudo nonetheless ?
> Noone else can modify /etc/sudoers, so parallel access is not possible.

If sudo is your only access and you make a mistake editing the file
then you can break sudo such that you can't use sudo again.  That
would leave you with only the normal root login to fix the problem.
Many newer systems only configure sudo for root access.  Using the
visudo command checks the syntax before moving the file into place.

Using visudo is the safe recommendation because of the extra checking
it performs.  This is as the old saying goes, if you have to ask...
Having said all of that I do often simply edit the file myself using
an editor without going through vidsudo.  If I break it then I will
have to fix it and know it was my own fault for doing so.


More information about the sudo-users mailing list