sudo changing environment variables

Tom Alsberg alsbergt at
Tue May 7 12:42:07 EDT 2002

Hi there.

Is there, or will there be, a way to configure sudo not to change
environment variables like LOGNAME, USER, MAILPATH, etc., except for
patching the source?
I think this would be a more sensible behaviour, and should at least
be configurable to be that way...

The way su doesn't change those variables, it seems more sensible, so
that the user's environment is more preserved, and for example
some applications use the preferences/rc files of the user issuing the
su command (usually the desired behaviour), and RCS gets the author's
correct identity...

  Best regards,
  -- Tom

  Tom Alsberg - certified insane, complete illiterate.
        e-mail: <alsbergt at>
  * An idea is not responsible for the people who believe in it.

More information about the sudo-users mailing list