Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Erik Persson <erik@ikp.liu.se>
Subject: Re: Recovering Lost passwd file
Date: 1999/03/04	[thread overview]
Message-ID: <t0k8wxcfh4.fsf@oberon.ikp.liu.se> (raw)
In-Reply-To: mvyD2.730$66.38680@ptah.visi.com

"Ellefson" <ellefson@visi.com> writes:

> I need to know if there is a way to recover a what appears to be a zeroed
> out passwd file by manipulating the passwd.pag.  There is no backup, all the
> users were created in one evening (600 or so) and a backup could not be
> taken although I realize a cp of the /etc/passwd to /etc/passwd.bak, would
> of save my butt.  It is not know as of yet what actually happened to the
> passwd file.  But I would like to know up front before we start recreating
> them over again if we have a fighting chance at salvaging the  lost passwd
> file.  Thanks for you help!
> 
> Jason

You will probably need both the .dir and .pag files, but if you have
these you could do it like this (if the names are passwd.pag and
passwd.dir):

makedbm -u passwd > passwd.restore

This will create a listing with lines that looks like:

<number> <regular passwd entry>

so, som awk processing might be in place.

makedbm -u passwd | awk '{print $2}' > passwd.restore

/Erik

-- 
Erik Persson, System Manager            e-mail: erik@ikp.liu.se
Dept. of Mech. Engineering              Voice: +46 13 28 2464
University of Link�ping, Sweden		Fax:   +46 13 28 2717



  reply	other threads:[~1999-03-04  5:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-04  5:00 Recovering Lost passwd file Ellefson
1999-03-04  5:00 ` Erik Persson [this message]
1999-03-08  5:00   ` Allan Hawdon
1999-03-11  5:00 ` Ron Feral
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