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-24 03:15:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.doit.wisc.edu!not-for-mail From: Craig Markwardt Newsgroups: comp.unix.tru64 Subject: Re: corrupt /etc/passwd Date: 24 Jul 2002 05:04:17 -0500 Organization: U. Wisc. Madison Physics -- Compact Objects Sender: craigm@cow.physics.wisc.edu Message-ID: References: <3d3d52b5$1@eumel.hag.hilti.com> Reply-To: craigmnet@cow.physics.wisc.edu NNTP-Posting-Host: cow.physics.wisc.edu X-Trace: news.doit.wisc.edu 1027505056 17042 128.104.220.128 (24 Jul 2002 10:04:16 GMT) X-Complaints-To: abuse@doit.wisc.edu NNTP-Posting-Date: Wed, 24 Jul 2002 10:04:16 +0000 (UTC) X-Newsreader: Gnus v5.7/Emacs 20.4 Xref: archiver1.google.com comp.unix.tru64:8207 "Nikola Milutinovic" writes: > "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. If the password database is still intact, and people can log in, then won't the command "ypcat passwd" produce a legitimate ASCII version of the password file? Craig -- -------------------------------------------------------------------------- Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu --------------------------------------------------------------------------