[arch-general] Question about visudo and info in the Wiki

Karol Blazewicz karol.blazewicz at gmail.com
Fri Dec 30 16:49:50 EST 2011


On Fri, Dec 30, 2011 at 10:23 PM, Don Juan <donjuansjiz at gmail.com> 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'.


More information about the arch-general mailing list