> And I get the same problem on another machine. > > That's strange.
Ha, I think I got it. LS_COLORS is included by default in env_keep. If you don't set (or just append to) env_keep, LS_COLORS will be passed on, irrespective of -i and/or env_reset. If you overwrite env_keep (by assigning to it), LS_COLORS will be wiped from the environment. Can you reproduce that? And now that I know what to look for, I found it in the docs, in sudoers(5), the description of env_reset: | If set, sudo will reset the environment to only contain the LOGNAME, | MAIL, SHELL, USER, USERNAME and the SUDO_* variables. Any variables in | the caller's environment that match the env_keep and env_check lists | are then added. The default contents of the env_keep and env_check | lists are displayed when sudo is run by root with the -V option. If | the secure_path option is set, its value will be used for the PATH | environment variable. This flag is on by default. Also note that that's not even true, sudo -V displays the current (from /etc/sudoers) values of env_*, not the default (compiled in) ones. Do you agree this is a documentation issue then? cheers, Jan -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
signature.asc
Description: Digital signature