On 12/30/2011 01:18 PM, Karol Blazewicz wrote:
On Fri, Dec 30, 2011 at 10:13 PM, Don Juan<donjuansjiz@gmail.com> wrote:
but even as root user I can do it, so wouldn't it not do it under root since sudo is not involved? Not sure what you mean here.
Have you tried restricting the use of EDITOR w/o recompiling sudo: https://wiki.archlinux.org/index.php/Sudo#Using_visudo
# Defaults specification # Reset environment by default Defaults env_reset # Set default EDITOR to vim, and do not allow visudo to use EDITOR/VISUAL. Defaults editor=/usr/bin/vim, !env_editor I just meant if I log in as root I can run the envvar. Its not issue to me I am just the type to try what things say its not able to do. So I first tried as a normal user, hence the need for sudo, I understand why sudo and running the command works (thanks to your link). 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?