[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Fwd: Re: Correct sudoers file configuration]



steef wrote:
> 
> 
> -------- Original Message --------
> Subject:     Re: Correct sudoers file configuration
> Resent-Date:     Tue, 26 May 2009 08:32:39 +0000 (UTC)
> Resent-From:     debian-user@lists.debian.org
> Date:     Tue, 26 May 2009 09:32:14 +0100
> From:     thveillon.debian <thveillon.debian@googlemail.com>
> To:     debian-user@lists.debian.org
> References:     <[🔎] 886fa7aa0905260042kdfa863au8c2f44a4f0be087@mail.gmail.com>
> 
> 
> 
> Jason Filippou wrote:
> <.............>
> 
> You need to use the command "visudo" to edit the sudo configuration file
> (/etc/sudoers).
> 
> 
> Tom
> 
> why??  why not  (to start with)  # nano /etc/sudoers  ??
> 
> regards,
> 
> steef

If you want to use nano with visudo, just use:

export VISUAL=nano

and later put in /etc/sudoers

Defaults editor = /usr/bin/nano:/usr/bin/vi


This works on Debian currently, not on every distribution.


"visudo" store the file in a buffer for edition, makes sure there is no
concurrent access to it, and perform syntax check before writing the
changes.
You can if you must use any editor with root privileges instead of
visudo, it's just not the safe way.


Tom


Reply to: