[ale] root's shell prompt

Jason Day jasonday at worldnet.att.net
Fri May 9 17:01:25 EDT 2003


On Fri, May 09, 2003 at 03:58:12PM -0400, John Wells wrote:
> On most of my machines, when I su to root, the $PS1 prompt changes.  This
> is a nice feature, because I always know when I'm root or not by looking
> at the prompt.
> 
> However, on one of my machines, when I su to root, the prompt stays the
> same as the original uid's.  It seems to me it used to work as described
> above, but now it does not.
> 
> Anyone know what controls this behavior, and how I get it back to the way
> it was?  I really don't want the change PS1 in root's .bash_profile and
> then be forced to use "su -" all the time.

>From the bash man page:

PROMPTING
       When executing interactively, bash  displays  the  primary
       prompt  PS1  when  it  is ready to read a command, and the
       secondary prompt PS2 when it needs more input to  complete
       a  command.   Bash  allows these prompt strings to be cus­
       tomized by inserting a number of backslash-escaped special
       characters that are decoded as follows:
[snip]
              \$     if  the effective UID is 0, a #, otherwise a $

Is this the behavior you mean, or was it something more?  Do you have a
'\$' in your PS1?
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list