Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
BarlafussOffline
Post subject: [SOLVED]no more apt/dpkg use as user via sudo  PostPosted: 07.09.2011, 16:01



Joined: 2010-09-14
Posts: 45

Status: Offline
since last week dist-upgrade, I'm not more able to install any package as "simple" user, working fine as usual by root-user. Below an example:
as user :
      Code:

xxxxxxx@siduxbox:~/temp$ sudo apt-get install lame-doc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  lame-doc
0 upgraded, 1 newly installed, 0 to remove and 189 not upgraded.
Need to get 0 B/168 kB of archives.
After this operation, 344 kB of additional disk space will be used.
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.
dpkg: error: 2 expected programs not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
xxxxxxx@siduxbox:~/temp$


As root
      Code:

xxxxxxx@siduxbox:~/temp$ su
Password:
root@siduxbox:/home/xxxxxxx/temp# apt-get install lame-doc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  lame-doc
0 upgraded, 1 newly installed, 0 to remove and 189 not upgraded.
Need to get 0 B/168 kB of archives.
After this operation, 344 kB of additional disk space will be used.
Selecting previously deselected package lame-doc.
(Reading database ... 184472 files and directories currently installed.)
Unpacking lame-doc (from .../lame-doc_1%3a3.98.4-0.2_all.deb) ...
Setting up lame-doc (1:3.98.4-0.2) ...
root@siduxbox:/home/xxxxxxx/temp#


Why ? any hints where to check ?

Thanks in advance,
Barlafuss


Last edited by Barlafuss on 07.09.2011, 18:35; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
towoOffline
Post subject: RE: no more apt/dpkg use as user via sudo  PostPosted: 07.09.2011, 16:18



Joined: 2010-09-13
Posts: 500
Location: Pößneck / Thüringen
Status: Offline
Check /etc/sudoers, there is needed a new parameter secure_path=.
 
 View user's profile Send private message  
Reply with quote Back to top
BarlafussOffline
Post subject: RE: no more apt/dpkg use as user via sudo  PostPosted: 07.09.2011, 18:34



Joined: 2010-09-14
Posts: 45

Status: Offline
OK, thanks . Solved.
Added :
      Code:

Defaults    secure_path="/sbin:/bin:/usr/sbin:/usr/bin"

in /etc/sudoers.

Found via google similar issue in 2006 ???
 
 View user's profile Send private message  
Reply with quote Back to top
DeepDayzeOffline
Post subject: RE: no more apt/dpkg use as user via sudo  PostPosted: 07.09.2011, 20:36



Joined: 2010-09-11
Posts: 616
Location: USA
Status: Offline
This problem would occur if you kept your original config when debconf asks you when it upgraded the sudo package. The old sudo version did not have that new parameter
 
 View user's profile Send private message  
Reply with quote Back to top
BarlafussOffline
Post subject: RE: no more apt/dpkg use as user via sudo  PostPosted: 08.09.2011, 10:21



Joined: 2010-09-14
Posts: 45

Status: Offline
OK, understood.
Now it's clear.
Thanks.
Barlafuss
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio