I had a similar problem with switching to the root
user and not getting all of root's path variables
added to my environment. my instructor said to use
this command:

su - root

And it worked like a charm. Apparently it loads you
into a new shell exactly like you just logged in as
the user. All your old paths will be unavailable but
all of root's paths will be part of the environment.

hope this helps

Aaron

--- Naitik Shah <[EMAIL PROTECTED]> wrote:
> One possibility might be the fact that when you su,
> I believe .bashrc gets executed, and .bash_profile
> does not, as it isn't a login shell. Whereas when
> you login (or alternatively do: su -c "bash --login"
> ) .bash_profile gets run. So depending on the paths
> each of these set, your path could possibly vary in
> a login / non-login shell.
> 
> Naitik.
> 
> On Sat, 04 Oct 2003 08:56:49 +0200
> Neo <[EMAIL PROTECTED]> wrote:
> 
> > On Fri, 2003-10-03 at 21:20, Steve Doerr wrote:
> > > I'm confused about root's bash profile.  In vt1,
> the directories /sbin & 
> > > /usr/local/sbin are excluded from the path.  If
> I su to root within 
> > > Gnome or KDE in a terminal they are there.
> > > 
> > > I'm not sure why there isn't a common bash
> profile for root in vt1 vs. 
> > > vt7.  Where would the two be located?  Within
> vt1, will 
> > > PATH=/dir1:/dir2:/diretc/:$PATH add it
> permanently?
> > > 
> > > Thanks for any input,
> > > Steve
> > > 
> > 
> > Hi Steve,
> > 
> >     if you find out, I would like to know too! Tanks.
> > 
> > Sincerely,
> > 
> > Jan.
> > 
> > 
> > -- 
> > To UNSUBSCRIBE, email to
> [EMAIL PROTECTED] 
> > with a subject of "unsubscribe". Trouble? Contact
> [EMAIL PROTECTED]
> > 
> 
> 
> -- 
> To UNSUBSCRIBE, email to
> [EMAIL PROTECTED] 
> with a subject of "unsubscribe". Trouble? Contact
> [EMAIL PROTECTED]
> 

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to