[NTLUG:Discuss] Re: SuSE 9 or 9.1 PATH environment changes after su -- no way to get the user path?

Stephen Davidson gorky at ispwest.com
Mon Sep 13 14:30:49 CDT 2004


Bryan J. Smith wrote:

>On Mon, 2004-09-13 at 08:14, Stephen Davidson wrote:
>  
>
>>>>steve at blue:~> echo $PATH
>>>>/home/steve/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin
>>>>        
>>>>
>
>No sbin in the path.
>
>  
>
>>>>steve at blue:~> su
>>>>Password:
>>>>blue:/home/steve # echo $PATH
>>>>/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin
>>>>        
>>>>
>
>Now there is an sbin in the path.
>
>  
>
>>steve at blue:/tmp> su -
>>Password:
>>blue:~ # echo $PATH
>>/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin
>>    
>>
>
>Now there is _both_ sbin _and_ the user path.
>
>So how do I get just the user path?  I can't!
>
>-- Bryan
>
>P.S.  Thanx Steve.
>
>  
>
Greeting, Bryan.

NP.  Probably should mention, when I log in as root, root has full 
system as well as root stuff in path, so what you could be seeing is the 
path for the root user.

Regards,
Steve

-- 
Java/J2EE Developer/Integrator
Stephen Davidson and Associates, Inc.
Chair, Dallas/FortWorth J2EE Sig
214-724-7741





More information about the Discuss mailing list