Bazooka Joe wrote:
That happens to me also - not w/ those particular progs but anything in /usr/sbin and /sbin I have to specify the path and yes I am su'd as root. I figured it was something i screwed in my .profile and haven't bothered to spend the time to figure it out.
Please note that 'su root' is NOT the same as 'su - root'. In the first case it will retain YOUR defined path, whereas the second one will switch to root's path.
su root:
[6] 12:55:07 <kirash@ivanhoe:~> echo $PATH /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/kirash/bin
[7] 12:55:10 <kirash@ivanhoe:~> su root Password: [1] 12:55:17 <root@ivanhoe:/home/kirash> echo $PATH /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/kirash/bin
Now the other one: su - root
[8] 12:55:59 <kirash@ivanhoe:~> echo $PATH /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/kirash/bin
[9] 12:56:02 <kirash@ivanhoe:~> su - root Password: [1] 12:56:05 <root@ivanhoe:~> echo $PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin