Date: Wed, 14 May 2008 20:22:49 -0500 From: Derek Ragona <derek@computinginnovations.com> To: "Montag" <montag@activeattack.com>, "freebsd questions" <freebsd-questions@freebsd.org> Subject: Re: Configuring Bash Message-ID: <6.0.0.22.2.20080514202017.025c52e0@mail.computinginnovations.com> In-Reply-To: <1210813830.15267.1253229895@webmail.messagingengine.com> References: <1210810823.5782.1253224263@webmail.messagingengine.com> <6.0.0.22.2.20080514195044.026c43b0@mail.computinginnovations.com> <1210813830.15267.1253229895@webmail.messagingengine.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 08:10 PM 5/14/2008, Montag wrote:
> > ### SNIP ###
> > Are you saying it works if you:
> > su - root
>
>Yes, that's correct.
>
> > But logging in as a regular user. So, can you:
> > login as a regular user
> > su - root
> > su - [regular user]
>
>Interesting, this produces the correct output.
>
>Login : ${PS1} $ $ (Wrong)
>su-root : [root@host-- /home/user]# (Correct)
>su-user : [user@host-- ~]$ (Correct)
>exit : [root@host-- /home/user]# (Correct)
>exit : ${PS1} $ $ (Wrong)
>
>This does not really jive with what I read in the man pages. It said
>that .bash_login is invoked during login, while .bashrc is used when an
>interactive shell that is not a login shell is started. Currently I do
>not even have a .bashrc defined, so the only thing that should be
>getting used is .bash_profile. Why does su invoke .bash_profile?
>
>The relevant entries from /etc/password are:
>root:*:0:0:Charlie &:/root:/usr/local/bin/bash
>user:*:1001:0:User &:/home/user:/usr/local/bin/bash
I would try adding the prompt to .bashrc too, worst case it will redefine
it the same prompt making login take a fraction longer.
Also be sure:
/home/user
is owned by user and has the correct group too.
By the way, if the man pages are out of sync, it wouldn't be the first time.
-Derek
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.0.22.2.20080514202017.025c52e0>
