Date: Tue, 9 Jan 2001 22:48:10 -0500 From: "Robert Myers" <ccrider@whiterose.net> To: "'jason'" <jhunt@blaz.homeip.net>, <freebsd-questions@FreeBSD.ORG> Subject: RE: su su Message-ID: <000601c07ab8$27136ed0$0201a8c0@ccrider2k> In-Reply-To: <3A5BCD63.101CF6F@blaz.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> I am sure this is probably asked a million times a day, and I am most > likely overlooking something, since I am an idiot. > > however, I will still ask the question (since I am an idiot) when > I login, > I use a regular account then su when I need to modify things as root. > Problem is, when I do su, I get this annoying environment prompt: > Well, I doubt your an idiot, you did ask when you got into something you did not know, I know lots of people who would fail forever than ask for help, now those guys are idiots.... > su-2.04# ..I use bash, and my .profile reflects the correct PS1 info, > so I don't know what the hell to do.. thanks for any help, if you so > desire. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000601c07ab8$27136ed0$0201a8c0>