Re: PS1 & PS2
"FRK" == Richard Kettlewell <richard@elmail.co.uk> writes:
FRK> Bill Hogan writes:
>> Hello.
>>
>> My prompt strings $PS1 and $PS2 work as expected for non-root users
>> but not for root.
>>
>> Here is my /etc/profile:
# cat /etc/profile
----------------------- quote ----------------------------
# /etc/profile: system-wide .profile file for bash(1).
# $Id: profile,v 3.2 1995/01/21 12:32:53 imurdock Exp $
export PAGER='less -qCi'
export LESS='-qCi -P?f% .?ltLine %lt:?pt%pt\%:?btByte %bt:-...'
export EDITOR=/usr/bin/elvis
export VISUAL=pico
# define bash prompts
export PS1='\h:[*\u*]\w \$ '
export PS2='\h:[*\u*] And? \$ '
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:."
umask 022
------------------------ unquote ------------------------
FRK> Do you have /root/.bash_profile or /root/.profile ? If so, you may
FRK> find that sets the prompt. (See `man bash', under `INVOCATION' for
FRK> precise details of files that bash reads.)
FRK> ttfn/rjk
Oops.
My /etc/profile sets login prompts $PS1 and $PS2 correctly but now
I discover that Debian left a `.bash_profile' in /root that REsets
$PS1 (but not $PS2) as follows:
--------------------------- quote ---------------------------
# ~/.bash_profile: executed by bash(1) for login shells.
# $Id: dot.bash_profile,v 3.1 1995/01/21 11:17:57 imurdock Exp $
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"PS1="\\$"
export PATH PS1
mesg n
umask 022
--------------------------- unquote -------------------------
Thus $PS2 as per my /etc/profile is still in effect for root logins:
# arf \
bedlam:[*root*] And? #
Thank you.
Bill
Reply to: