Matthew Miller wrote:
On Wed, Feb 23, 2005 at 05:06:07PM -0800, Rick Stevens wrote:
Of course, you could just do without the alias and type "vim" rather
than "vi".
That will not work. sudo does NOT execute the user's profile scripts so
the alias won't work for sudo. The only answer is to actually have sudo
run "vim" instead of "vi".
This is a good thing -- sudo should avoid doing anything but what it's told.
I agree. The previous poster had asked if he could set up an alias so
his "sudo vi file" would work in vim. It won't, and I was just
explaining why. sudo should do the absolute minimum needed and people
really should read the man pages if they don't get it. sudo can be
quite dangerous if it's misconfigured.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- The world is coming to an end ... SAVE YOUR FILES!!! -
----------------------------------------------------------------------