Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Jan 2001 22:34:58 -0800
From:      Will Yardley <william@hq.newdream.net>
To:        tony <tony@tntpro.com>
Cc:        Robert Myers <ccrider@whiterose.net>, 'jason' <jhunt@blaz.homeip.net>, questions@freebsd.org
Subject:   Re: su su
Message-ID:  <3A5C0292.254713AA@hq.newdream.net>
References:  <000601c07ab8$27136ed0$0201a8c0@ccrider2k> <008d01c07abb$53bf68a0$0a00a8c0@tntpro.com>

next in thread | previous in thread | raw e-mail | index | archive | help
that's pretty much what i was going to say (although i was having a hard
time trying to explain it... also... i wouldn't copy your .bashrc or
.bash_profile over root's since there's usually some stuff about root's
$PATH variable and other important rootly stuff in there.

also su - opens up a shell with root's environment variables and su
(without the -) opens it up with yours (i am pretty sure) so you could
copy (or source) your .bash_profile in your .bashrc

i use sudo most of the time and just open up a root shell like that (ie
sudo bash)
then it will source your .bashrc

-w
> >
> > OK. Bash only sources (executes) the .profile when called from login.
> >
> > When you are su'ing you are not invoking bash from the login, but
> > interactively.
> > When you invoke bash after you are logged in, i.e. from screen or su, bash
> > looks at
> > .bashrc
> >
> > What I usually do, is something like this:
> >
> > in ~/.bash_profile:
> >
> > source ~/.bashrc
> >
> > then put all of my PS1 and 2 nonsense in my .bashrc along with all of the
> > other noise
> > that is associated with that. :)
> >
> > Hope that helps.
> >
> > Robert Myers
> > Systems Administrator
> > White Rose Internet Service
> > http://whiterose.net
> > (717)439-1478
> >
> >
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> >
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A5C0292.254713AA>