Operating System - HP-UX
1832265 Members
2909 Online
110041 Solutions
New Discussion

Re: Who output giving me ????

 
Gram Ludlow
Frequent Advisor

Who output giving me ????

I'm running HP-UX 11.00 on a 735. When i'm logged into CDE with several HPTerms running, and I issue a who command, it reports back the login name as ????. Why is it doing this, and how can I fix it? Thanks!
Turning and turning in the widening gyre,
6 REPLIES 6
Marcel Boon
Trusted Contributor

Re: Who output giving me ????

Hi,

if you check your variables with cmd: "set"
what output do you get by "LOGNAME" ?

Marcel
See the man pages
Carsten Krege
Honored Contributor

Re: Who output giving me ????

I would say that not the output of the environment variable LOGGNAME is decisive here, but more the output of the commands

# logname
and
# id

The variable LOGNAME would give the current uid you are using, whereas who(1) displays probably the login name returned by getlogin(3C). These are different when you ran su(1) after login.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Tim D Fulford
Honored Contributor

Re: Who output giving me ????

This is more of a throw away comment, not really a solution; make sure your /etc/passwd file does not contain a user called ???? which will certainly confuse the issue.

We once had weird usernames added to our system by mistake (bad scripting!!)

Tim
-
Alex Glennie
Honored Contributor

Re: Who output giving me ????

Using a PC Xemulation package by any chance ?


The problem with the "who -u" command results from not recording login information in the /var/adm/wtmp file.

Hummingbird Exceed's "xstart" command is connecting to the HP-UX system using "rexec" by default, and not "telnet" or "rlogin", for "Start Method". This does not update /var/adm/wtmp.


To get the file /var/adm/wtmp updated use "rlogin (TCP/IP)" or "telnet (TCP/IP)" as "Start Method" in the "xtart" utility.


The "rexec" command (commonly referred-to as remsh on Unix Systems) is intended to run commands on a remote machine, and communicates with the rexecd on that machine to do so.
Since these accesses are not usually considered logins, they are not logged to /var/adm/wtmp. However, the typical semantics for this command are such that if no command line is explicitly given, remshd will instead perform the task of rlogind to generate a login shell. The rlogind-based login will produce a entry in the file /var/adm/wtmp.


So, "rexec ux_server sh" will produce no /var/adm/wtmp entry, but "rexec ux_server" will produce a login and appropriate entries in the file /var/adm/wtmp. This behavior is the same as it was on 9.X, and can be shown using UX-to-UX usage of "rexec" or "remsh", followed by examining the wtmp file using /usr/lib/acct/fwtmp (9.x) or /usr/sbin/fwmp (10.x).


So, the contents of /var/adm/wtmp depend on exactly what Hummingbird Exceed's xstart command is exec'ing.


I suspect the case is true of most other X emulators I know reflections X works the same and the problem is no doubt the same at hpux 11.xx ?

Is this your scenario/problem ?
Brian Hackley
Honored Contributor

Re: Who output giving me ????

Hi,
To follow up on Alex's comments. The 11.0 r-commands patch PHCO_17030 introduced this bug fix:
3. JAGab21128: remshd and rexecd are not updating the "/var/adm/wtmp" and "/var/adm/btmp" files.
The latest version of the 11.0 r-commands patch is now PHNE_21731.

Hope this helps,
-> Brian Hackley
Ask me about telecommuting!
Gram Ludlow
Frequent Advisor

Re: Who output giving me ????

Thanks for the help guys. I'm not logging in with an emulation/remote terminal software, I'm at the physical station.

'logname' returns ????. 'id' returns the correct uid/gid and all that.

I'll try to track down where the logname environment variable got set incorrectly, but as always, any thoughts/ideas will be much appreciated.
Turning and turning in the widening gyre,