SUMMARY: sunos 4.1.4 utmp corrupted, how do I rebuild

From: jem@electriciti.com
Date: Tue Aug 20 1996 - 14:12:23 CDT


Hello,

I have received a couple of responses, none of which solved my problem,
both of which helped me figure out that opie was at fault. The responses
received with their corresponding results are listed below:

-----
From: ahill@lanser.net (Alan Hill)

1) if you have /etc/utmpx, then try
          cp /etc/utmpx /etc/utmp
2) if you have /var/adm/*tmp*, then link it
3) if still no luck, then try
          cp /etc/wtmp /etc/utmp

*** RESPONSE: On SunOS 4.1.4, I could not find utmpx. I tried linking it
               up with /var/adm/wtmp (only *tmp* in /var/adm). Not good.
               Different format file. Finally, no wtmp file in /etc.

-----
From: tim@ben.dciem.dnd.ca

Historically, /etc/utmp was rebuilt by "init" as the system began coming
up multi-user.

*** RESPONSE: Tried rebooting with zero length /etc/utmp file. Rebooting
               did not rebuild file. Tried removing file completely. Was
               rebuilt as zero length file.

-----
This final suggestion and response gave me some ideas, though. I replaced
the opie login with the fcs sun version. As soon as I log in, the file
is rebuilt with a minimum of utmp slot entries to include the one you just
came in on. Additional slots are created as additional users log on.

So, my conclusion is that opie login is the problem. It is also the
location of the actual creation of utmp slot entries. I will now send in
the request to the skey mailing list and see what I get from there.

Thanks for the replies.

JohnM

## John Mendenhall
## jem@electriciti.com
## Senior Network/Systems Administrator

Here is my original question:

> I have been playing around with opie 2.22 and 2.3 beta 3.
> The login process appears to have corrupted the /etc/utmp
> file, so I tried removing it so it could rebuild it, but
> I could not reboot. So I just created an empty file and
> it never logs any entries because it can't find the appropriate
> slot. What can I do to get this file rebuilt? Thanks for
> any help you all can provide.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:08 CDT