Date: Wed, 14 May 2008 20:10:30 -0500 From: "Montag" <montag@activeattack.com> To: derek@computinginnovations.com, "freebsd questions" <freebsd-questions@freebsd.org> Subject: Re: Configuring Bash Message-ID: <1210813830.15267.1253229895@webmail.messagingengine.com> In-Reply-To: <6.0.0.22.2.20080514195044.026c43b0@mail.computinginnovations.com> References: <1210810823.5782.1253224263@webmail.messagingengine.com> <6.0.0.22.2.20080514195044.026c43b0@mail.computinginnovations.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> ### 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 montag -------------------------- "Give the people contests they win by remembering the words to more popular songs or the names of state capitals or how much corn Iowa grew last year. Cram them full of non-combustible data, chock them so damned full of 'facts' they feel stuffed, but absolutely 'brilliant' with information. Then they'll feel they're thinking, they'll get a sense of motion without moving."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1210813830.15267.1253229895>