Operating System - HP-UX
1833949 Members
1845 Online
110063 Solutions
New Discussion

Re: Strange behaviour from hpterm

 

Strange behaviour from hpterm

Hello admins,

I'm having a problem with hpterm. When I start it and I run "who am i", I get the following:

pp073000@sgmps2a[/usr/users/pp073000]> who am i
???? pty/ttys8 Feb 21 14:48

It seems that the shell doesn't know who I am. If I run "whoami", it works.

The problem is that I want to run the ldappasswd command from an hpterm and it uses the "who am i" command.

OS is HPUX 11.11 using CDE.

Thanks!
Rikk
Carpe Diem
2 REPLIES 2
Alex Glennie
Honored Contributor

Re: Strange behaviour from hpterm

Is this local or via Reflections or similar.

Does the problem change if you start hpterm with a -ls option ?

Could wtmp etc be corrupted ? just some thoughts.

ps all users and what shell ?
Bill Hassell
Honored Contributor

Re: Strange behaviour from hpterm

Try a 'real' telnet from your PC or another box. Does who work correctly now? Does the problem occur with just one user or are all users affected? These questions are leading up to a common conclusion: who uses /var/adm/wtmp which is easily corrupted with bad connections. Use the last command to see if there are problems in the wtmp file:

last -50

or for the problem user:

last -50 probuser

If you see orphaned sessions, this may be the problem. A new wtmp file is needed (reboot).

Also check the environment with the set command. Check that logname command works:

logname

Also verify that $LOGNAME and $USER are set to the user's login name.

Finally, the terminal emulators in CDE (xterm, dtterm and hpterm) run a "no login" session which has a number of funny side effects. To get hpterm (and the others) to really login, do this in every user's HOME directory:

echo "*loginShell:true" >> $HOME/.Xdefaults

Now each terminal will run the user's profiles like a normal login and the shell for the window will have a - in front (like: -sh) indicating a login shell.


Bill Hassell, sysadmin