Operating System - HP-UX
1834828 Members
2177 Online
110070 Solutions
New Discussion

logname command and Reflections x

 
Penni Nussbaum
Frequent Advisor

logname command and Reflections x

When I login through regular telnet (I use Reflections), the command "logname" shows my login name. However, when I login through Reflections X ( X windowing), the command" logname" returns "????". This is not a pathing problelm, as when I enter /usr/bin/logname, it still returns "????".
What environment issue am I missing?
1 REPLY 1
Steve Steel
Honored Contributor

Re: logname command and Reflections x

Operating System - HP-UX
Version - 11.0
Hardware System - HP9000
Series - K570
Subsystem - Terminal Emulation: hpterm and xterm

Solution

Remsh usually allocates streams-based device files (/dev/pts/#).
In this case hpterm or xterm allocate the device file and they use
the non-streams based device files like /dev/ttyp1.

'who am i' and similar commands obtain their information from utmp.
The entries in utmp are already corrupt (they have '????' or '.'
instead of the user name). This problem happens if hpterm or xterm
are invoked on an HP-UX 11.0 system configured as an NIS slave server
or client AND the file /etc/nsswitch.conf is used to lookup users in
NIS.

If you check your 11.0 system, you will see the following line in
nsswitch.conf:

passwd: files nis

In your /etc/passwd file there is no '+' sign. This absence means
that only nsswitch.conf is used for resolving your users in the NIS
database.

Both hpterm and xterm are older terminal emulators. They were not
adapted to only use nsswitch.conf to resolve user names and IDs. This
functionality is new on HP-UX 10.30 and 11.0.

The work-around is to add a '+' sign to the end of /etc/passwd. This
allows hpterm/xterm to resolve the user name correctly.

As hpterm will be discontinued, you should consider using dtterm
instead. It does not exhibit this problem.

See the '11.0 Release Notes' for information on hpterm discontinuance:

Discontinuance

Hpterm will be shipped for the final time on HP-UX 11.0.
Two terminal emulators, hpterm and dtterm, have shipped
for the last three releases: 10.10, 10.20, and 10.30.
With the discontinuance of VUE at the 10.30 release, CDE
is the default desktop environment and dtterm is the
default terminal emulator.



If you want truly to understand something, try to change it. (Kurt Lewin)