Public bug reported:

Binary package hint: sudo

Hi

If I login over ssh as initialuser to a server and "sudo -i -u
anotheruser" or "sudo -s -u anotheruser", MAIL= is set to
/var/mail/initialuser which means that e.g. mail/mailx/mutt or even zsh
are using the wrong mailbox.

It seems that MAIL is set in either of these ways:
- sshd sets it (apparently by default; not sure how to override)
- pam_mail sets it unless noenv is passed in the PAM config; the default PAM 
config for "login" and "su" use pam_mail without noenv and the default config 
of sshd uses pam_mail *with* noenv
- some custom shell config might set it

Either we fix sshd/login NOT to set MAIL by default, but I don't think
that's useful, or we fix sudo to set MAIL=, at least in some cases.  I
think sudo -i should definitely cause MAIL to be set properly.

Bye

ProblemType: Bug
Architecture: amd64
Date: Fri Jan 15 15:11:13 2010
DistroRelease: Ubuntu 9.10
Package: sudo 1.7.0-1ubuntu2
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.31-17.54-server
SourcePackage: sudo
Uname: Linux 2.6.31-17-server x86_64

** Affects: sudo (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug

-- 
Keeps incorrect MAIL= env var from previous user
https://bugs.launchpad.net/bugs/507934
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to