[comp.unix.aix] Wierd problem with who and finger...

dbeedle@rs6000.cmp.ilstu.edu (Dave Beedle) (03/26/91)

     Hi all.  I've got a strange problem going on with AIX 3003.  When I do
a who or an Finger I see one user (not the same all the time) who appears
to have been logged on for 26 (or more) days.  The user is not currently
logged on and has no processes running.  What is going on?  We recently
installed xwindows, pcsim, AIX access, and a compiler or two.
     
     Anoter question.  Is anyone using AIX access for DOS and/or XONDOS?  I
cannot get either on to work correctly at all.  Even the installation does
not work right!  I have not called "software support" about this yet.  Any
body else had problems with these?
 
     Last, I just started using Xwindows.  How the heck do I increase the
font size in my windows?  Their so tiny on such a big monitor!
 
     Thanks for any and all help!

-- 
  Dave Beedle                                    Office of Academic Computing
                                                    Illinois State University
  Internet:  dbeedle@rs6000.cmp.ilstu.edu                    136A Julian Hall  
    Bitnet:  dbeedle@ilstu.bitnet                          Normal, Il   61761

s900387@minyos.xx.rmit.oz.au (Craig Macbride) (03/28/91)

dbeedle@rs6000.cmp.ilstu.edu (Dave Beedle) writes:

>     Hi all.  I've got a strange problem going on with AIX 3003.  When I do
>a who or an Finger I see one user (not the same all the time) who appears
>to have been logged on for 26 (or more) days.  The user is not currently
>logged on and has no processes running.  What is going on?

luxor@latrobe.edu.au has the same problem ... sits there with who showing
about 10 users, all but one or two with ludicrous logged on times, and some
even with the same pty numbers as each other.

Looks like just another shoddy Unix port to me. :-)

-- 
 _--_|\		Craig Macbride	<uni: s900387@minyos.xx.rmit.oz.au>
/      \			<work: craig@bacchus.esa.oz.au>
\_.--.*/
      v

jfh@rpp386.cactus.org (John F Haugh II) (03/29/91)

In article <1991Mar25.164317.9775@rs6000.cmp.ilstu.edu> dbeedle@rs6000.cmp.ilstu.edu (Dave Beedle) writes:
>     Hi all.  I've got a strange problem going on with AIX 3003.  When I do
>a who or an Finger I see one user (not the same all the time) who appears
>to have been logged on for 26 (or more) days.  The user is not currently
>logged on and has no processes running.  What is going on?  We recently
>installed xwindows, pcsim, AIX access, and a compiler or two.

I've mentioned this several times, so here is the source code.  This code
is being provided without warrantee (or even a copyright notice).  Use it
at your own risk.

Compile this program with "cc -o /etc/utmpd utmpd.c" and run in the background
with "nohup /etc/utmpd < /dev/null > /dev/null 2>&1 &" from your /etc/rc file.
I use it on this system to clean up utmp file entries left over from various
programs that create sessions on pty devices.

DISCLAIMER: I speak for myself only.  My employers are not responsible for
what I post here and will not provide support for this code or anything it
may do to your system.  Use at your own risk.
--
---- begin utmpd.c ----
#include <sys/types.h>
#include <utmp.h>
#include <fcntl.h>

main ()
{
	int	fd;
	struct	utmp	utmp;

	while (1) {
		if ((fd = open ("/etc/utmp", O_RDWR)) < 0)
			exit (1);

		while (read (fd, &utmp, sizeof utmp) == sizeof utmp) {
			if (utmp.ut_type == USER_PROCESS &&
					kill (utmp.ut_pid, 0) != 0) {
				lseek (fd, - (long) sizeof utmp, 1);
				utmp.ut_type = DEAD_PROCESS;
				write (fd, &utmp, sizeof utmp);
			}
		}
		close (fd);
		sleep (60);
	}
}
---- end utmpd.c ----
-- 
John F. Haugh II        | Distribution to  | UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832 | GEnie PROHIBITED :-) |  Domain: jfh@rpp386.cactus.org
"I want to be Robin to Bush's Batman."
                -- Vice President Dan Quayle