[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sudo verwendet nicht $PATH des users



Hallo Matthias!

Matthias Meyer schrieb am Sonntag, den 15. November 2009:

> Ich möchte $PATH eines Users (backuppc) verändern. Habe dazu in
> $HOME/.bashrc eingetragen:
> export PATH=$PATH:/usr/share/backuppc/bin
> 
> Funktioniert auch. ABER:
> fileserver:~# sudo -u backuppc echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Hast Du das so eingegeben? Da fehlen einfache Anführungszeichen, um zu 
verhindern, dass Deine Shell das vorher schon expandiert. Probiere auch 
mal die Option -i

Es könnte allerdings sein, dass das alles wirkungslos bleibt, weil 
Debians sudo mit SECURE_PATH kompiliert ist, IIRC. Das könnte Spiele mit 
$PATH verkomplizieren.

Grüße
Christian
-- 
• Now, most of you are probably going to be totally bored out of your minds
  on Christmas day, and here's the perfect distraction. Test 2.6.15-rc7. All
  the stores will be closed, and there's really nothing better to do in
  between meals.
       Linus Torvalds 


Reply to: