On Fri, Dec 30, 2011 at 10:23 PM, Don Juan <[email protected]> wrote:
> But if you are USER root you don't need to run sudo, so hence wouldn't 
> running EDITOR=nano visudo
> not work if you are a root user, since sudo is not involved?

visudo uses the EDITOR / VISUAL vars, see the man page:

ENVIRONMENT
       The following environment variables may be consulted depending on the
       value of the editor and env_editor sudoers variables:
       VISUAL          Invoked by visudo as the editor to use
       EDITOR          Used by visudo if VISUAL is not set

See, these variables are used *by visudo*. As you said, sudo is needed
only for the user, otherwise I get 'visudo: /etc/sudoers: Permission
denied'.

Reply via email to