From: "Nikola Milutinovic" <Nikola.Milutinovic@ev.co.yu>
Subject: Re: corrupt /etc/passwd
Date: Wed, 24 Jul 2002 07:32:51 +0200 [thread overview]
Message-ID: <ahlfdb$vcr$1@Mercury.ev.co.yu> (raw)
In-Reply-To: 3d3d52b5$1@eumel.hag.hilti.com
"Skaghk" <skaghk@hotmail.com> 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.
next prev parent reply other threads:[~2002-07-24 5:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-23 12:57 corrupt /etc/passwd Skaghk
2002-07-23 14:11 ` Sylvain Robitaille
2002-07-24 5:32 ` Nikola Milutinovic [this message]
2002-07-24 10:04 ` Craig Markwardt
2002-07-24 12:05 ` Stuart Fuller
2002-07-24 12:24 ` Skaghk
2002-07-30 14:19 ` Michael Joosten
2002-07-31 18:42 ` Sylvain Robitaille
2002-08-05 14:42 ` Michael Joosten
2002-07-24 17:01 ` Rich Alderson
2002-07-24 18:53 ` Paul A Sand
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox