RE: Environment and Sudo
>Commands invoked using sudo do not receive/honor environment items or >aliases. >Example would be the alias vi="vim". Invoking normally will run vim, invoking >using sudo vi will get the "other" vi. >Is there something else I need in /etc/profile or some .bashrc? So for security reasons, the env is being cleansed. Posted was a Defaults !env_reset line at head of the sudoers file. Maybe this does indeed keep env entries. What does one do about aliases, such as rm="rm -i" vi="vim" and such? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Environment and Sudo
On 5/25/06, David Baron <[EMAIL PROTECTED]> wrote: Commands invoked using sudo do not receive/honor environment items or aliases.Example would be the alias vi="vim". Invoking normally will run vim, invokingusing sudo vi will get the "other" vi. Is there something else I need in /etc/profile or some .bashrc? yes, you have to put correct entries in /etc/sudoers for more information on setting up sudoers, do google for 'howto sudo', there are hundreds of pointers! ~viraj --To UNSUBSCRIBE, email to [EMAIL PROTECTED]with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]