-
spixx
-
RE: superuser
-
Quick note:
The reason boo works for user X should be because of the fact that you have added /home/X/bin to the PATH (you can check the command out by writing echo $PATH in terminal). When switching to root the user no longer has any PATH entry to that particular folder thus writing boo checks folder /bin /sbin and such but cannot find the script. This is not true when using sudo since sudo is a nice way of doing su -c '/path/to/script/ sudo does the command as another user (namely root) and there the PATH is different :)
Hope that helped any other who wondered.
echo $PATH as user:
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:[color=#FF0000][b]/home/XXX/bin[/b][/color]
And sudo:
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:[color=#FF0000][b]/home/XXX/bin[/b][/color]
And as sudo su:
/sbin:/bin:/usr/sbin:/usr/bin
Note the difference. I'm using Centos so I'm not sure that sudo behaves in the same way on any other dist though.
-
28 Jul 11
Quick note:
The reason boo works for user X should be because of the fact that you have added /home/X/bin to the PATH (you can check the command out by writing echo $PATH in terminal). When switching to root the user no longer has any PATH entry to that particular folder thus writing boo checks folder /bin /sbin and such but cannot find the script. This is not true when using sudo since sudo is a nice way of doing su -c '/path/to/script/ sudo does the command as another user (namely root) and there the PATH is different :)
Hope that helped any other who wondered.
echo $PATH as user:
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/XXX/bin
And sudo:
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/XXX/bin
And as sudo su:
/sbin:/bin:/usr/sbin:/usr/bin
Note the difference. I'm using Centos so I'm not sure that sudo behaves in the same way on any other dist though.