sudoers files and apt-get upgrade

Vince Hillier vince-WxfNDWQh5LNIo2TaICnI/Q at public.gmane.org
Wed Mar 8 04:10:35 UTC 2006


On Tue, Mar 07, 2006 at 07:39:03PM -0800, James. Q Li wrote:
> hi, 
> 
> (using debian sarge stable)
> 
> I can't find a good config for sudoer file to deal with the environment setup problem in recent
> sudo upgrade. in short, i had the following lines in my /etc/sudoers file
>   Defaults     !set_logname,env_reset,env_keep=*
> then my $HOME is still my user home under sudo and i am happy.
> 
> however, I started to having problem about it while doing apt-get upgrade. the problem is that
> when doing apt-get upgrade unsing my sudo account, all of the postinst script failed because it
> couldn't find the path to some of the commands it invokes. 
> for example i was trying to upgrade 'tar' today and it complains that
> "/var/lib/dpkg/info/tar.postinst: line 4: install-info: command not found"
> 
> however, i added echo $PATH to the script and it output the correct paths.
> I can su - then run apt-get upgrade without problem.
> then i take out the above line in /etc/sudoers file, sudo apt-get upgrade is fine again.
> 
> anyone had similar problem ? what's ya sudoers file setup for this?

Hi James,

This has been working great for me:

Defaults  env_reset,env_keep+="DISPLAY HOME XAUTHORIZATION"

-- 
Vince Hillier vince-WxfNDWQh5LNIo2TaICnI/Q at public.gmane.org
System Administrator
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list