[Fedora] Re: Do I need to reinstall?

Ashley M. Kirchner ashley at pcraft.com
Fri Feb 23 20:05:38 UTC 2007


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 at ivanhoe:~> echo $PATH
/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/kirash/bin

[7] 12:55:10 <kirash at ivanhoe:~> su root
Password:
[1] 12:55:17 <root at 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 at ivanhoe:~> echo $PATH
/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/kirash/bin

[9] 12:56:02 <kirash at ivanhoe:~> su - root
Password:
[1] 12:56:05 <root at ivanhoe:~> echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin

-- 
W | It's not a bug - it's an undocumented feature.
  +--------------------------------------------------------------------
  Ashley M. Kirchner <mailto:ashley at pcraft.com>   .   303.442.6410 x130
  IT Director / SysAdmin / Websmith             .     800.441.3873 x130
  Photo Craft Imaging                       .     3550 Arapahoe Ave. #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.




More information about the users mailing list