Description of problem: When I do 'sudo {cmd}', the HOME environment variable is set to the home directory of the target user. Fedora 12 and earlier do not modify the HOME environment variable. Version-Release number of selected component (if applicable): sudo-1.7.4p4-4.fc14.x86_64 How reproducible: Deterministic. Steps to Reproduce: 1. Setup /etc/sudoers.d/xxx to allow you to sudo to root. 2. Do sudo sh 3. Do echo $HOME Or echo ~ Actual results: Home of the root user (/root). Expected results: Home of the original user. Additional info: The problem is fixed by adding the line Defaults env_keep += "HOME" to the file /etc/sudoers. See Also: https://bugzilla.redhat.com/show_bug.cgi?id=635250 http://www.sudo.ws/pipermail/sudo-users/2010-September/004478.html
More info from a colleague. It has to do with sudo being built with the –with-secure-path flag. There have been outstanding bugs with other distributions for this issue for a while. Interesting that Fedora adopted this default behavior as well. https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/50797 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=85123 It even looks like Fedora tried this before in FC10, and it was fixed, so they’ve reintroduced the issue in FC14. https://bugzilla.redhat.com/show_bug.cgi?id=471603
This message is a notice that Fedora 14 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 14. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '14' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 14 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping