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

Bryan J. Smith b.j.smith at ieee.org
Mon Sep 13 12:59:55 CDT 2004


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.

-- 
Bryan J. Smith                                  b.j.smith at ieee.org 
------------------------------------------------------------------ 
"Communities don't have rights. Only individuals in the community
 have rights. ... That idea of community rights is firmly rooted
 in the 'Communist Manifesto.'" -- Michael Badnarik





More information about the Discuss mailing list