I noticed that
su - would not execute the environment settings; i.e, the content of .
profile in the "target" account. When
su - was executed, the prompt would be a $ or # depending on the user (and that none of the environment settings for the user would be set).
I use Korn Shell exclusively, so a user will have a
.profile and a
.kshrc file to set environment variables; these were ignored (and, I imagine, ignored in Bash, Bourne or C-Shell too).
Looking around, there is
/etc/login.defs that contains a variable
SU_NAME; I commented that out and the behavior of
su is back to what I expect it to be. The blurb for
SU_NAME is:
Code:
#
# If defined, the command name to display when running "su -". For
# example, if this is defined as "su" then a "ps" will display the
# command is "-su". If not defined, then "ps" would display the
# name of the shell actually being run, e.g. something like "-sh".
#
Lordy, I do so love
improvements...