Bugzilla – Bug 228
HOME not set if NOPASSWD tag used
Last modified: 2008-11-07 09:42:19 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.
same applies to sudo bash -c env | grep XAUTHORITY
Unable to reproduce with sudo 1.6.9p17