Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 1997 09:06:51 -0700 (MST)
From:      Charles Mott <cmott@snake.srv.net>
To:        Sheldon Hearn <axl@iafrica.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: su and PS1
Message-ID:  <Pine.BSF.3.96.970825090408.8405A-100000@darkstar.home>
In-Reply-To: <4923.872494706@axl.iafrica.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970825090408.8405A-100000>