> One solution would be to provide a /etc/environment file containing the > right value for LINUX_MODULE_DIRECTORY (‘sudo’ honors that, according to > sudoers(5).)
Yes, this is interesting. When i considered this previously i prematurely put it aside because it requires PAM, and i wrongly concluded our sudo wasn't configured with PAM (based on package definition). On second look, i see PAM is on by default for Linux distributions when building sudo; also running sudo -V as root user confirms this. However, creating /etc/environment and putting stuff there doesn't have any effect for me. But i believe the reason is that a module needs to be added to linux-pam, namely pam_env[1]. I'd like to have a go at this and see if i can make a patch for this. Maybe it makes sense to put /all/ the environment variables, especially for root operations, in /etc/environment? From what i understand variables from outside this file will not be expanded, so if not it would mean duplicating definitions. Also, having this as a just-for-those-sudo-users would be easy for root users to miss updating. Then obviously root logins would have to make use of this file as well, but i'm sure that can be arranged. I'll look more into this. [1] http://www.linux-pam.org/Linux-PAM-html/sag-pam_env.html Petter