Fix for trashed /etc/utmp?

David B. Thomas dt at yenta.alb.nm.us
Fri Apr 26 10:02:35 AEST 1991


ostroff at penelope.Oswego.EDU (Boyd Ostroff) writes:

>So, I was curious if there are any utilities out there which can re-build
>a messed up utmp file without having to re-boot the system.  I'm also

Yup ...

$ > /etc/utmp

Okay, it's not elegant, but it works.  Any users currently logged in won't
be listed anymore, of course, and the run level entry won't be there ..
but it's not such a big deal.  The system can run ok.  As long as any users
who were on log off, then back on, utmp is accurate again.  The command
who -r will fail until you reboot or change run levels.  Simply issuing
# init 2
might fix even this, though I'd have to check.

						little david
-- 
Unix is not your mother.



More information about the Comp.sys.3b1 mailing list