From owner-freebsd-questions Mon Aug 25 09:40:37 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA21552 for questions-outgoing; Mon, 25 Aug 1997 09:40:37 -0700 (PDT) Received: from axl.iafrica.com (root@axl.iafrica.com [196.31.1.167]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA21530 for ; Mon, 25 Aug 1997 09:40:29 -0700 (PDT) Received: from axl.iafrica.com (sheldonh@localhost [127.0.0.1]) by axl.iafrica.com (8.8.7/8.8.7) with ESMTP id SAA07940; Mon, 25 Aug 1997 18:40:07 +0200 (SAT) X-Mailer: exmh version 2.0zeta 7/24/97 From: Sheldon Hearn To: Charles Mott cc: freebsd-questions@FreeBSD.ORG Subject: Re: su and PS1 In-reply-to: Your message of "Mon, 25 Aug 1997 09:06:51 MST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 25 Aug 1997 18:40:07 +0200 Message-ID: <7936.872527207@axl.iafrica.com> Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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. You're correct. All of sh, bash and csh render \$ as "#" for superuser. But this has nothing to do with my original point. My point is that the su manpage appears to claim that su does something it doesn't seem to do. Perhaps what the manpage _means_ is "if you change uid to 0 your shell will probably use a '#' as your prompt, depending on whether you use \$ in your PS1 environment variable". But that's not what it says. It may just be badly worded, but the manpage is _easily_ (mis)interpreted as meaning "su changes your prompt". If this just boils down to poor wording, I don't think the su manpage should mention the change of prompt at all. The prompt change has nothing to do with su. It's solely dependant on your shell and any files your shell uses to configure the environment. The exception is that su -l causes the shell to believe it's a login shell, hopefully forcing it to use profiles of some kind to configure the environment. Still, any effect this has on the prompt relates to the shell, not su. Is this the sort of hair-splitting that we'd all rather do without, or do other people think the manpage would be clearer without the reference to the superuser prompt? Sheldon.