Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Sep 1997 10:21:44 -0400
From:      Bob Webb <bob.webb@snyder.com>
To:        "'freebsd-questions@freebsd.org'" <freebsd-questions@freebsd.org>
Subject:   su -m and PS1
Message-ID:  <c=US%a=_%p=SNYDER%l=BETHHQMAIL-970929142144Z-9837@BETHHQMAIL>

next in thread | raw e-mail | index | archive | help
I subscribe to the philosophy to login as yourself and su to root when 
needed. The problem I am having is that I have use bash for my user id 
with a PS1 that displays the active directory (PS1='\u@\h:\w\$'). I 
would like to keep this PS1 when I su to root, but it does not work. I 
tried su -m as well. It keeps my environment intact, EXCEPT for PS1 !

When I su to root, I get a PS1 that is "'\s-\v\$ '

Root does not have a .bash_profile or bashrc, and the .profile has no 
reference to a PS1. I tried greping around for files containing a 
reference to PS1 to try and find where root is picking up this PS1 
value, but no luck.

Any ideas ??

Thanks,
Bob/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c=US%a=_%p=SNYDER%l=BETHHQMAIL-970929142144Z-9837>