Operating System - HP-UX
1833772 Members
2254 Online
110063 Solutions
New Discussion

"who am i" not working???

 
Rick Starke
Occasional Contributor

"who am i" not working???

Ok.. this is WEIRD!! I am using HP-UX 11i and "who am i" doesn't work. "whoami" does, but there is a call in an application which uses the former and the developers won't change it to the latter as "who am i" is standard across UNIX systems and "whoami" isn't. (news to me) Am I missing something? Did I "lose" something - besides my marbles? Is this a known "feature" in 11i??? Thanks!!
If I could find the info I wouldn't bother you people...
7 REPLIES 7
someone_4
Honored Contributor

Re: "who am i" not working???

hello
what if you try just the command
who
and do a man for each of them
who
who am i
whoami
i am on 11.0 and I get a man page for each of them. If anything you can make an allias.

Richard
Praveen Bezawada
Respected Contributor

Re: "who am i" not working???

Hi
who am i
IS working on my 1100 box and it is included in 11i

...BPK...
Eileen Millen
Trusted Contributor

Re: "who am i" not working???

who am i is working on our 11i A class system installed from June 2001 CD.
Magdi KAMAL
Respected Contributor

Re: "who am i" not working???

Hi Rick,

1.Log to the system as the application user name, and type "who am i" ( and see if it or not work ).

2.If not, Check if the path to /usr/bin is included in the environment variable PATH, and it's precedance is before user paths.

3.Check if the permission on the /usr/bin/who is set to allow execution for the "other" group.

/usr/bin/who is owned by bin:bin and permission is 777

4.Check also :
#which who
to see, if the who command is defined more than once ( the redefinition of the who by any user and the precedence in the PATH variable may result of abnormal behaviour ).

Magdi
Magdi KAMAL
Respected Contributor

Re: "who am i" not working???

Hi Again,

Sorry, permission on /usr/bin/who is 555 !

Magdi
Bill McNAMARA_1
Honored Contributor

Re: "who am i" not working???

Refer to the following hp-ux 11i o/p which is working fine. Check permissions of /etc/passwd and the entries in /etc/passwd.

# uname -a
HP-UX sd4a B.11.11 U 9000/800 1718176411 unlimited-user license
#
# which whoami
/usr/bin/whoami
# whoami
root
# ll /usr/bin/whoami
-r-xr-xr-x 1 bin bin 12288 Nov 14 2000 /usr/bin/whoami

# which who
/usr/bin/who
# who am i
root pts/0 Aug 27 09:40
# ll /usr/bin/who
-r-xr-xr-x 1 bin bin 24576 Nov 14 2000 /usr/bin/who

# ll /etc/passwd
-rw-r--r-- 1 root root 584 Jun 5 16:40 /etc/passwd
It works for me (tm)
Wodisch
Honored Contributor

Re: "who am i" not working???

Hello Rick,

first, check wether the user running your application
is able to use "who" at all! If not, then check permissions
of "/usr/bin/who" and "/var/adm/?tmp"... or use the
"swverify" tool and read the "/var/adm/sw/swverify.log".

Next, check if your user is actually logged in or wether
s/he is using "su(1M)" - then "who" should report the
name of the person s/he used for logging in, and not
the id being su-ed to...

And most important: what is broken/what is the error???

HTH,
Wodisch