From owner-freebsd-questions Mon Aug 25 09:07:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA19840 for questions-outgoing; Mon, 25 Aug 1997 09:07:51 -0700 (PDT) Received: from srv.net (snake.srv.net [199.104.81.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA19833 for ; Mon, 25 Aug 1997 09:07:43 -0700 (PDT) Received: from darkstar.home (dialin1.anlw.anl.gov [141.221.254.101]) by srv.net (8.8.5/8.8.5) with SMTP id KAA26196; Mon, 25 Aug 1997 10:07:26 -0600 (MDT) Date: Mon, 25 Aug 1997 09:06:51 -0700 (MST) From: Charles Mott X-Sender: cmott@darkstar.home To: Sheldon Hearn cc: freebsd-questions@FreeBSD.ORG Subject: Re: su and PS1 In-Reply-To: <4923.872494706@axl.iafrica.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, 25 Aug 1997, Sheldon Hearn wrote: > > This is from su(1) under 2.2-STABLE : > > | By default (unless the prompt is reset by a startup file) the super-user > | prompt is set to ``#'' to remind one of its awesome power. > > The su program doesn't actually appear to do this. Even if su is run > with -l (emulate full login) PS1 is only affected by .profile commands, > not by su itself. > > Is the man page wrong / out of date or is su simply not doing what it's > supposed to with the command prompt? Or have I misunderstood how the > command prompt is manipulated (some way other than with PS1)? If you are using bash, and PS1='\$', then the prompt will be $ for a normal user account and # after su to root. This is described in the bash man page. I don't know how the other shells handle this. Charles Mott