From owner-freebsd-questions@FreeBSD.ORG Thu May 15 01:10:31 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B27161065671 for ; Thu, 15 May 2008 01:10:31 +0000 (UTC) (envelope-from montag@activeattack.com) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9FB8FC20 for ; Thu, 15 May 2008 01:10:31 +0000 (UTC) (envelope-from montag@activeattack.com) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 01005109593; Wed, 14 May 2008 21:10:30 -0400 (EDT) Received: from web6.messagingengine.com ([10.202.2.215]) by compute1.internal (MEProxy); Wed, 14 May 2008 21:10:31 -0400 Received: by web6.messagingengine.com (Postfix, from userid 99) id D6DE049ECF; Wed, 14 May 2008 21:10:30 -0400 (EDT) Message-Id: <1210813830.15267.1253229895@webmail.messagingengine.com> X-Sasl-Enc: mNprUfAfuteI9MAFkVsL5m5d3ihXRkaH/jsfulNb6nDH 1210813830 From: "Montag" To: derek@computinginnovations.com, "freebsd questions" Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface References: <1210810823.5782.1253224263@webmail.messagingengine.com> <6.0.0.22.2.20080514195044.026c43b0@mail.computinginnovations.com> In-Reply-To: <6.0.0.22.2.20080514195044.026c43b0@mail.computinginnovations.com> Date: Wed, 14 May 2008 20:10:30 -0500 Cc: Subject: Re: Configuring Bash X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2008 01:10:31 -0000 > ### 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."