add users to sudo file

Bob Nielsen nielsen at oz.net
Mon Nov 15 06:26:28 UTC 2004


On Sun, Nov 14, 2004 at 07:47:24PM -0800, Daniel Robitaille wrote:
> > > I haven't messed with the sudoers file in Ubuntu, but in YDL (and Linux
> > > in general?) to give sudoers sudo powers, you have to edit the file
> > > sudoers using a text editor called visudo, if I recall.
> > >
> > ...or 'sudo <any text editor> /etc/sudoers' will work.
> 
> the advantage of "visudo" instead of "any text editor" is that visudo
> will do, before you save the file, some sanity checks and make sure
> you don't have any syntax errors in your sudoers file.  That will
> prevent most ways of screwing badly your sudoers files.  And Ubuntu is
> especially vulnerable to a screwup in that fashion since,  if your
> sudoers file is corrupts or buggy,  chances are good you will not be
> able to do a sudo command to go repair it afterward.  And you don't
> have a root login as a backup way to go re-modify your sudoers
> files...
> 
> Personally I only use visudo to modify my /etc/sudoers just to play it safe.

Note that /etc/sudoers only has read permissions.  visudo gets around
that.  It can also use the $EDITOR environmental variable to use a
different editor than vi, if desired.





More information about the ubuntu-users mailing list