>>>have someone log on to his pty. that'll clear the utmp entry.
>That will not always work. It doesn't here. Sometimes, if an Xterminal
>is turned off without logging off (or crashes), it will leave ghost
>entries in utmp for over a week (then suddenly it gets cleared with no
>explanation).
Pretty crappy, but pretty common. Really, whatever is handling that
session really ought to remove the utmp entry if it detects the
terminal is dead. If it can't detect it then it should just "hang out
there" until you kill it. Then it should remove the entry.
Personally, I think utmp is one of those things that needs to be
rethunk entirely (like that whole subsystem).
Quote:>>How to log on to a specific pty?
>To my knowledge, you cannot specify which pty for the xterms to use, it
>just gets an "unused" one automatically.
Depending on the system, xterm may try to find an open pty by trying
each one. Thus, if a low numbered pty is not getting used, something
somewhere is holding it open.
Quote:>I have asked about this before: "How does one rebuild the utmp database
>when it becomes corrupt?" there were no replies.
There should be some programs (at least on SysV-like machines) in
/usr/lib/acct called something like fwtmp. This converts utmp files
into editable ASCII and back to binary. I have always wonder why in
the spirit of the rest of the system why this file is ASCII.
>I can't even find something manual, like a utmp editor or modification
>command so I can manually remove incorrect entries. One sure way to
>rebuild it is to reboot the machine. Of course, this is not an option
>here.
>--
> /--------------------------------------------------------------------------\
> | Mark A. Davis | Lake Taylor Hospital | Norfolk, VA (804)-461-5001x431 |
> \--------------------------------------------------------------------------/
--
Benjamin Z. Golds*