From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,c785d8fd79fda27b X-Google-Attributes: gidfee84,public From: Erik Persson Subject: Re: Recovering Lost passwd file Date: 1999/03/04 Message-ID: #1/1 X-Deja-AN: 451226419 Content-Transfer-Encoding: 8bit Sender: erik@oberon.ikp.liu.se References: Content-Type: text/plain; charset=iso-8859-1 Organization: IKP - Link�ping University Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 "Ellefson" 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: 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