From owner-freebsd-questions@FreeBSD.ORG Thu May 15 01:21:16 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 4A9271065672 for ; Thu, 15 May 2008 01:21:16 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from betty.computinginnovations.com (mail.computinginnovations.com [64.81.227.250]) by mx1.freebsd.org (Postfix) with ESMTP id E781A8FC19 for ; Thu, 15 May 2008 01:21:15 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from p28.computinginnovations.com (dhcp-10-20-30-100.computinginnovations.com [10.20.30.100]) (authenticated bits=0) by betty.computinginnovations.com (8.14.2/8.14.2) with ESMTP id m4F1L4CM098410; Wed, 14 May 2008 20:21:05 -0500 (CDT) (envelope-from derek@computinginnovations.com) Message-Id: <6.0.0.22.2.20080514202017.025c52e0@mail.computinginnovations.com> X-Sender: derek@mail.computinginnovations.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Wed, 14 May 2008 20:22:49 -0500 To: "Montag" , "freebsd questions" From: Derek Ragona 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> Mime-Version: 1.0 X-Antivirus: avast! (VPS 080514-0, 05/14/2008), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV 0.93/6806/Wed Apr 16 15:50:16 2008 on betty.computinginnovations.com X-Virus-Status: Clean X-ComputingInnovations-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: m4F1L4CM098410 X-ComputingInnovations-MailScanner: Found to be clean X-ComputingInnovations-MailScanner-From: derek@computinginnovations.com X-Spam-Status: No Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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:21:16 -0000 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.