su - starts a login shell for root. Info page says:
su - Make the shell a login shell. This means the following. Unset all
environment variables except `TERM', `HOME', and `SHELL' (which
are set as described above), and `USER' and `LOGNAME' (which are
set, even for the super-user, as described above), and set `PATH'
to a compiled-in default value. Change to USER's home directory.
Prepend `-' to the shell's name, intended to make it read its
login startup file(s)
So, this does two things I don't want:
Change to ~/root
Uses root .bash_history. I want to use the john's history
On 01/23/02, 07:04:02PM -0800, David Talkington wrote:
>
> Cameron Simpson wrote:
>
> >su root -c ". /etc/profile; . /root/.bash_profile; export HISTFILE=$HISTFILE; exec
>bash -i'
>
> How does that differ from the effect of 'su -'?
>
> - -d
>
> - --
> David Talkington
--
John P. Verel
Living Proof That Low Tech Beats High Tech!
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list