Bug 228 - HOME not set if NOPASSWD tag used
HOME not set if NOPASSWD tag used
Status: RESOLVED WORKSFORME
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.8
Other Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-16 18:40 MST by Henning Moll
Modified: 2008-11-07 09:42 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Moll 2006-11-16 18:40:04 MST
System: a fresh ubuntu dapper install. The sudoers file looks like this:

---sudoers---
Defaults        !lecture,tty_tickets,!fqdn
root    ALL=(ALL) ALL
%admin  ALL=(ALL) ALL
---sudoers---

All following commands are executed by a user who is member of group 'admin'.
The output of command
sudo bash -c env | grep HOME
is
HOME=/home/<calling_user>

Now, if i append '%admin ALL=(ALL) NOPASSWD: /bin/bash' to the sudoers file and run the above command again no password is required, but the output is empty.
Why is there this different behaviour? This has bad impact for X applications: Only if $HOME is set, the <calling_user's> .Xauthority file is found and access to the XServer is granted. Without HOME being set (just by using NOPASSWD), access is denied.
Comment 1 Henning Moll 2007-11-15 10:44:37 MST
same applies to

sudo bash -c env | grep XAUTHORITY
Comment 2 Todd C. Miller 2008-11-07 09:42:19 MST
Unable to reproduce with sudo 1.6.9p17