From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,e4ce2f02460124d3 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-07-23 22:45:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news-feed1.de1.concert.net!EUnet.yu!Mercury.ev.co.yu!not-for-mail From: "Nikola Milutinovic" Newsgroups: comp.unix.tru64 Subject: Re: corrupt /etc/passwd Date: Wed, 24 Jul 2002 07:32:51 +0200 Organization: EPS Elektrovojvodina Message-ID: References: <3d3d52b5$1@eumel.hag.hilti.com> NNTP-Posting-Host: brigitte.ev.co.yu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.unix.tru64:8205 "Skaghk" wrote in message news:3d3d52b5$1@eumel.hag.hilti.com... > Hi there, > > I got a box running Tru64 V. 4.0 which got a blown up /etc/passwd. The file > currently consitst of 4096 characters of ASCII 0. Surprisingly users still > can log in and su to root also works well. Changing passwords ist the only > thing, that does not work. > > There are two other files /etc/passwd.dir (as bad as passwd) and > /etc/passwd.pag (readable but wired passwd fragments) which I think got > created while /etc/passwd has been accessed rw last time. Running mkpasswd > did blow up the system completely. Restoring those two files at least > brought me bak to the original state. /etc/passwd.dir and /etc/passwd.pag are DBM files generated from /etc/passwd by command "mkpasswd". As long as they are intact, you'll be able to login, but nothing else. Restoring? Well, I suppose it can be restored, but I've never seen a utility for that. Theoretically, you could write a small C program to just open DBM version and read all keyes and write them to STDOUT. > Has anyone got an idea how to fix the /etc/passwd file? Apart from writing a C program yourself? No. Nix.