[svlug] Paths broken as root

aaronl@vitelus.com aaronl at vitelus.com
Sun Nov 22 16:59:03 PST 1998


Hi,

I have set up my PATH variable in /etc/bashrc to include directories such
as /usr/local/bin, /sbin, /usr/sbin, /usr/X11R6, etc:
PATH="$PATH:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/bin/X11"

It really sucks, especially when I try to run certain scripts as root
which expect to find excecutables in the current path (namely startx,
which tries to excecute xinit without a full path).

This works fine as a normal user, but not as root. This is ilustrated in
the example below, where I try to run wget, which resides in
/usr/local/bin, before and after a su:

[aaronl at vitelus aaronl]$ wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
[aaronl at vitelus aaronl]$ su
Password:
[root at vitelus aaronl]# wget
bash: wget: command not found
[root at vitelus aaronl]# /usr/local/bin/wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.



What's going on? root's .bashrc file is identical to aaronl's, and neither
have a .profile file.


Thanks,
Aaron Lehmann


--
echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe
see http://www.svlug.org/mdstuff/lists.shtml for posting guidelines.



More information about the svlug mailing list