Thanks to the perennial Dr. Thomas P. Blinn, John Speno and Joe Ledesma :
There has been a change in behavior of the su command between v4.x and v5.x
in the
handling of the LOGNAME environment variable. There has also been a change
in the
manpage for su between v4.0e and v4.0f. The manpage change correctly
documents the v4.x su behavior but doesn't match the change in v5.x.
In v4.x the su command modifies the USER and LOGNAME environment variables,
setting them to the username of the user being substituted. In v5.x only the
USER variable is modified, the LOGNAME variable retains the original login
name.
The behavior of 'who am i', whoami, id and logname remain unchanged. These
commands may be used to determine the current effective username and
original login username. The USER and LOGNAME env vars are subject to
modification by user processes and probably shouldn't be depended upon.
Alan Davis
davis_at_tessco.com
Received on Mon Apr 02 2001 - 14:50:36 NZST