From owner-freebsd-questions Fri Feb 28 11:56:38 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09FD037B405 for ; Fri, 28 Feb 2003 11:56:37 -0800 (PST) Received: from reiher.informatik.uni-wuerzburg.de (wi4d22.informatik.uni-wuerzburg.de [132.187.101.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DB1443FA3 for ; Fri, 28 Feb 2003 11:56:36 -0800 (PST) (envelope-from mkb@reiher.informatik.uni-wuerzburg.de) Received: by reiher.informatik.uni-wuerzburg.de (Postfix, from userid 1000) id A20CE5C3D; Fri, 28 Feb 2003 20:56:47 +0100 (CET) Date: Fri, 28 Feb 2003 20:56:47 +0100 From: Matthias Buelow To: freebsd-questions@freebsd.org Subject: recover /etc/passwd from pwd.db Message-ID: <20030228195647.GA751@reiher.informatik.uni-wuerzburg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi folks, after the latest crash of 5.0-p2/i386, my /etc/passwd and /etc/master.passwd are trashed (I used chsh just before the crash). My user line is missing in passwd, and the master.passwd file is just binary garbage. pwd.db and spwd.db however seem to be ok. How can I recover the text files from the databases? pwd_mkdb(8) talks about creating a v7 style passwd file via the -p option but I don't know what to pass as file argument, if I do pwd_mkdb -p /etc/pwd.db I get: pwd_mkdb: line #1 too long pwd_mkdb: /etc/pwd.db: Inappropriate file type or format Any solution? -- Matthias Buelow To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message