Why does xterm not put in a utmp entry?

Why does xterm not put in a utmp entry?

Post by Maxime Taksar KC6Z » Thu, 17 Dec 1992 09:25:21



I have a rather odd problem (in fact, all my users seem to
be having this problem).  Any login session using xterm
(the standard one shipped with AIX 3.1) does not write to
/etc/utmp.

This has a couple effects, one cosmetic, one very annoying.

The cosmetic problem is, of course, that the users logged
in using xterm do not show up to "who", "w", and other
programs that read utmp.

The very annoying problem is that occasionally a user will
bring up an xterm and will get not only their own shell, but
someone else's process fighting for control of the tty.  I'm
sure anyone can imagine the confusion this can cause.

I've tried setting the xterm executable to be suid, but this
had no effect.

Any hints or suggestions?  (And is anyone else having this
problem, or is it just me?)  I'm hoping that the answer isn't
"use aixterm", since we try to keep things like .Xdefaults
platform-independent.

--
------------------------------------------------------------

 
 
 

Why does xterm not put in a utmp entry?

Post by Murray S. Kucherawy [MFC » Fri, 18 Dec 1992 00:20:22



Quote:>I have a rather odd problem (in fact, all my users seem to
>be having this problem).  Any login session using xterm
>(the standard one shipped with AIX 3.1) does not write to
>/etc/utmp.

>This has a couple effects, one cosmetic, one very annoying.

>The cosmetic problem is, of course, that the users logged
>in using xterm do not show up to "who", "w", and other
>programs that read utmp.

>The very annoying problem is that occasionally a user will
>bring up an xterm and will get not only their own shell, but
>someone else's process fighting for control of the tty.  I'm
>sure anyone can imagine the confusion this can cause.

>I've tried setting the xterm executable to be suid, but this
>had no effect.

>Any hints or suggestions?  (And is anyone else having this
>problem, or is it just me?)  I'm hoping that the answer isn't
>"use aixterm", since we try to keep things like .Xdefaults
>platform-independent.

The xterm binary must be compiled with the appropriate options to ensure
that the code supporting utmp updates is included; check the makefile/imakefile
or README for which options to use.  I suspect the default is to leave that
code out of the xterm binary at compile time.

If the code provided with AIX doesn't give you this, then you can get the
full sources from the net.

-- Murray S. Kucherawy ----------------------------------------+--------------
Software Systems Co-op, Math Faculty Computing Facility [MFCF] | All spelling
University of Waterloo, Ontario, Canada                        | errors caused

---------------------------------------------------------------+--------------

 
 
 

Why does xterm not put in a utmp entry?

Post by Todd C. Mill » Fri, 18 Dec 1992 01:33:15


Adding the following to main.c will work:
#ifdef AIX3
#define HAS_UTMP_UT_HOST
#endif /* AIX3 */        

Alternately you could just add -DHAS_UTMP_UT_HOST to MAIN_DEFINES in the
Makefile or Imakefile.

 - todd
--

 
 
 

Why does xterm not put in a utmp entry?

Post by Kevin Smi » Sat, 19 Dec 1992 23:03:08



:>I have a rather odd problem (in fact, all my users seem to
:>be having this problem).  Any login session using xterm
:>(the standard one shipped with AIX 3.1) does not write to
:>/etc/utmp.
:>
:>This has a couple effects, one cosmetic, one very annoying.
:>
:>The cosmetic problem is, of course, that the users logged
:>in using xterm do not show up to "who", "w", and other
:>programs that read utmp.
:>
:>The very annoying problem is that occasionally a user will
:>bring up an xterm and will get not only their own shell, but
:>someone else's process fighting for control of the tty.  I'm
:>sure anyone can imagine the confusion this can cause.
:>
:>I've tried setting the xterm executable to be suid, but this
:>had no effect.
:>
:>Any hints or suggestions?  (And is anyone else having this
:>problem, or is it just me?)  I'm hoping that the answer isn't
:>"use aixterm", since we try to keep things like .Xdefaults
:>platform-independent.

You need to run xterm with the '+ut' flag or 'xterm*utmpInhibit: false'
resource.  This should cause xterm to write a /etc/utmp record for the
pseudo tty.
--

Kevin Smith | Voice - (908) 874-7980
            | Mail  - ShadeTree Software, Inc., 192 Capricorn Dr. #10,
            |         Somerville, NJ  08876

 
 
 

Why does xterm not put in a utmp entry?

Post by Murray S. Kucherawy [MFC » Wed, 23 Dec 1992 04:28:32



Quote:>Adding the following to main.c will work:
>#ifdef AIX3
>#define HAS_UTMP_UT_HOST
>#endif /* AIX3 */        

>Alternately you could just add -DHAS_UTMP_UT_HOST to MAIN_DEFINES in the
>Makefile or Imakefile.

Hmmm... neither worked for me.

I have -DUTMP -DWTMP -DHAS_UTMP_UT_HOST on the compiler command lines
and it doesn't work.  Do I need anything else?

-- Murray S. Kucherawy ----------------------------------------+--------------
Software Systems Co-op, Math Faculty Computing Facility [MFCF] | All spelling
University of Waterloo, Ontario, Canada                        | errors caused

---------------------------------------------------------------+--------------

 
 
 

Why does xterm not put in a utmp entry?

Post by Andrew R. Orndor » Wed, 23 Dec 1992 21:30:27


     I too have noticed that using the defines at compile time does not
necessarily enable writing the host entry to utmp.

     But then, I've also noticed that aixterm's started via rsh or rexec
also don't show up when a user does a who, even though the process is
definitely available. So, I'm assuming that the utmpInhibit option is
hiding around somewhere in one of the resource files.

----------------------------------------------------------------------------

NHTSA Data Center          UUCP:     ...uunet!dcatlas!zeus.dot.gov!drewo
U.S. DOT
400 7th Street, S.W.
Washington, D.C. 20590
--
----------------------------------------------------------------------------

NHTSA Data Center          UUCP:     ...uunet!dcatlas!zeus.dot.gov!drewo
U.S. DOT

 
 
 

Why does xterm not put in a utmp entry?

Post by Todd C. Mill » Thu, 31 Dec 1992 11:07:23


Well, we're running X11R5 libs & headers w/ the stock aix X server and it works
for us, so ours is not a traditional AIX 3.2 setup :-)
However, there is a really * bug.  Xterm will assign pty's to users that
are already in use!  I'm still trying to track down that puppy...

 - todd
--

 
 
 

Why does xterm not put in a utmp entry?

Post by Michael McDani » Sat, 09 Jan 1993 07:40:48


----------

Well, we're running X11R5 libs & headers w/ the stock aix X server and it works
for us, so ours is not a traditional AIX 3.2 setup :-)
However, there is a really * bug.  Xterm will assign pty's to users that
are already in use!  I'm still trying to track down that puppy...
----------

I've compiled up X11R5's version of xterm, I'm using AIX 3.2.x, and
'+ut' doesn't have any effect - no utmp entries...  I sure wish
somebody could get this working! :) :) :)
--

Enterprise Systems Division      {amdahl,decwrl,sun,unisoft}!apple!mdm
Apple Computer, Inc.

Pulaski: "You took my last chip, you could at least smile, Worf."
LaForge: "Smiling would break his concentration."
--Pulaski and LaForge, "The Emissary", Stardate 42901.3

 
 
 

Why does xterm not put in a utmp entry?

Post by David Joyn » Sat, 09 Jan 1993 10:09:02


:
: I've compiled up X11R5's version of xterm, I'm using AIX 3.2.x, and
: '+ut' doesn't have any effect - no utmp entries...  I sure wish
: somebody could get this working! :) :) :)
:

This should be in the FAQ:

When building MIT's xterm, make sure USE_SYSV_UTMP and UTMP are
defined.  Assuming you're not using any other code that wants a BSD
utmp file, this will also cure the problem of 'uptime' and 'w' showing
bogus uptimes.

--

Unix Systems Programmer                            | Phone: (919) 515-2794  |
NCSU Administrative Computing Services             | FAX:   (919) 515-3787  |

 
 
 

Why does xterm not put in a utmp entry?

Post by Vince Talusk » Mon, 11 Jan 1993 07:28:19



>This should be in the FAQ:

>When building MIT's xterm, make sure USE_SYSV_UTMP and UTMP are
>defined.  Assuming you're not using any other code that wants a BSD
>utmp file, this will also cure the problem of 'uptime' and 'w' showing
>bogus uptimes.

Is running an xterm without these parameters defined the usual way that
/etc/utmp gets hosed ?  Are there other known culprits that do this ?

What does one need to do to fix it ?  Why does rup give correct amounts
of uptimes and loads although the 3.2 man pages say:

  2.    Load average statistics are not kept by the AIX kernel.  The
  load averages are always reported as 0 (zero) by this command.

Works fine on my machine, can anyone tie up these loose ends...

--

Unix Services      Physics Computer Group    University of Texas at Austin

 
 
 

1. ssh doesn't put tty in utmp entry

I'm using ssh to connect to my home server, and it works fine except that it
doesn't put the tty in the utmp entry it creates.

This is not a huge deal, but it makes it impossible to "write" or "talk" to
me while logged in, because the programs don't see the tty I'm connected to.

From looking at the source it seems that it should write something, but
apparently it doesn't.  I'm hesitant to fiddle with the source though, so I
thought I'd ask you guys for advice first, is there anything I did wrong?

Note, this happens with both ssh and ssh2, with or without the -t flag.  I'm
running SuSE 6.1 if that makes any difference.

--
   Josef Drexler                 |    http://publish.uwo.ca/~jdrexler/
---------------------------------+----------------------------------------
 Please help Conserve Gravity    |  To email me, please change the country
 Don't do push ups               |  code to .ca - Death to Spammers!

2. Problem with X and Diamond Edge 3D

3. xterm doesn't add utmp entries in 2.5

4. Mount Point

5. new xterm: support for colors, utmp entry ("who")

6. Multiboot on a Toshiba Satellite Pro 440STN

7. utmp[x] entries for xterms get overwritten

8. IRC II fails under 1.3.20, works in 1.2.13, why?

9. HELP:Can not Login: No utmp entry !!!

10. No utmp entry (not in FAQ)

11. xterms not updating utmp

12. Xterms not cleaning up utmp properly / Telnet woes