set up a root password
Gene Heskett
gene.heskett at verizon.net
Wed Aug 6 12:48:17 UTC 2008
On Wednesday 06 August 2008, Nils Kassube wrote:
>Derek Broughton wrote:
>> Gene Heskett wrote:
>> > OTOH, that shell with root priv's should somehow make itself marked
>> > as such by a border color change or something, as when popping around
>> > to the various terminal shells running, it would be too easy to hit
>> > the wrong but root shell and mess the whole thing up.
>>
>> Can you imagine a way to do this? It's a good idea, but I don't know
>> if it could be done.
>
>You could put something like this line
>
>[ "$UID" = 0 ] && PS1='\[\033[01m\033[41m\033[37m\]\h: \w/ #\[\033[m\] '
>
>in the files $HOME/.bashrc and /root/.bashrc right before this line:
>
>export PS1 PS2 ignoreeof
>
>It will give you a white prompt with red background independent of the way
>you get a root shell.
>
>
>Nils
That looks as if it should work nicely. One other question? I'm in a root
shell, and I want to build the latest amanda snapshot, so I "su amanada;cd"
which puts me in ~/amanda where I build these. Will it keep that background I
have while I'm running as amanda, in this same shell? It seems like it
would, but ATM I haven't checked.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Walk softly and carry a big stick.
-- Theodore Roosevelt
More information about the kubuntu-users
mailing list