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

Bug#69090: strange su / which / apt behaviour



Package: general
Version: potato

I am experiencing some strange behavior when I su to root: Which seems to be
looking for things in the $PATH that is defined for my normal user account
instead of the superuser account:

$ su
# which ldconfig
# echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/local/linux/bin:/usr/bin/X11:/usr/games
# ls /sbin/ldconfig
/sbin/ldconfig
#


I also experience a similar problem with dselect: When I try to install certain
packages that use non-absolute paths for the commands in their .post-install
scripts it seems to check the $PATH of the normal user-account again.

Now when I use sudo things seem to be normal:

$ sudo which ldconfig
/sbin/ldconfig
$


On the other hand:

$ sudo -s
# which ldconfig
#


and:

$ su -c "which ldconfig"
Password:
$ 


I discussed the above with people on #debian (especially zonem) but we did not
find a solution to the problem.
It does not show up on all the machines I could try it on.

All machines I tried were updated to the latest potato packages.


Best Regards
  Jens

-- 
Jens Taprogge




Reply to: