Problem
I logged into SCO OpenServer Release 5 as the user "user1" and
then executed su(C) to another user, "user2". However, when I
execute the command "who am i" or "who -m" (see who(C)), this
command returns no value. In previous versions of SCO UNIX,
"who am i" returned the original login user name, for example:(Note that "sco_OSr5" refers to an SCO OpenServer 5 system and "sco_OSr3" refers to an SCO Open Desktop 3.0 system.)
Log in as "user1" on the system "sco_OSr5":
sco_OSr5# who am i
user1 ttyp0 Feb 28 07:02
sco_OSr5# su - user2
sco_OSr5# who am i
sco_OSr5#Log in as "user1" on the system "sco_OSr3":
sco_OSr3# who am i
user1 ttyp0 Feb 28 07:10
sco_OSr3# su - user2
sco_OSr3# who am i
user1 ttyp0 Feb 28 07:10
sco_OSr3# Cause
The who(C) utility uses the library routine cuserid(S) to obtain the character login name of the user.
In previous versions of SCO UNIX, cuserid(S) returned the original login name of the user.
In SCO OpenServer Release 5, cuserid(S) now returns the current
login name of the user. This results in the who(C) utility failing
to find a matching utmp(F) entry for this particular user name, and
hence, no value is output.This change to the library routine cuserid(S) was made to conform to the Posix/XPG4 standard.
Solution
As a workaround, use the program "/bin/who" from SCO UNIX Version 4.x-based operating systems, on SCO OpenServer 5.
This modification in behavior to the who(C) utility has been reported to SCO Engineering and is scheduled to be addressed in a future release of SCO OpenServer 5.