From owner-freebsd-questions@FreeBSD.ORG Sun Nov 22 04:27:28 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B181065670 for ; Sun, 22 Nov 2009 04:27:28 +0000 (UTC) (envelope-from gosand1982@yahoo.com) Received: from n10.bullet.mail.mud.yahoo.com (n10.bullet.mail.mud.yahoo.com [209.191.125.208]) by mx1.freebsd.org (Postfix) with SMTP id E4E908FC19 for ; Sun, 22 Nov 2009 04:27:27 +0000 (UTC) Received: from [68.142.200.221] by n10.bullet.mail.mud.yahoo.com with NNFMP; 22 Nov 2009 04:27:27 -0000 Received: from [76.13.13.26] by t9.bullet.mud.yahoo.com with NNFMP; 22 Nov 2009 04:27:27 -0000 Received: from [67.195.9.81] by t3.bullet.mail.ac4.yahoo.com with NNFMP; 22 Nov 2009 04:27:27 -0000 Received: from [67.195.9.103] by t1.bullet.mail.gq1.yahoo.com with NNFMP; 22 Nov 2009 04:27:26 -0000 Received: from [127.0.0.1] by omp107.mail.gq1.yahoo.com with NNFMP; 22 Nov 2009 04:27:26 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 848307.78652.bm@omp107.mail.gq1.yahoo.com Received: (qmail 37974 invoked by uid 60001); 22 Nov 2009 04:27:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1258864046; bh=tmI5tdzrznJW5QjS0nYdIG7k8ZzR95sDkPdXf/RJmvY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=rRp8+MY1gqyalfGbWTd4tXcSim59nk5t6gVPsovWzDvHsyaRgNTiyFcXD+TuexnYJTR+uNooUTECFB3w0fDQ0snooGiRonydH9W9BNeZSjtSpKqqMyiv5ISTNr05raHzdviMuV3SajFx3PxwfceOKPf80/e2kda6yAcwtCRDg4A= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=nkN633lZTHB5/UgshxGKD5ctUSGy+ExIRSyxDLOXZlVPXfr1inq9UZD6MEjzt5dvGweta5u74KUAfdSJF1rQuOPLHDtnobEgfGE1ZEH6oxZp+yVHCrNBJLjsS5buGn/15uJFXM0nQRdtLuffJNxc5KDXqNO/U6lE4A0X502Lju0=; Message-ID: <739790.37971.qm@web111611.mail.gq1.yahoo.com> X-YMail-OSG: XJNUAW4VM1koI99JZcHzPSydawRaLsJ6XKC68wRoxpqDmU4MHow1PFmgjSbJri.21HUQB.Z8ouB8dx61Fpo3EGDVbrXM4SY5EpZGBQlr6QPTb_UGGe8lYjv4Pt3wV.IgaaNUrCe.2_HV6N8cy9ShjvMf6pNPhHchaNjQBI3OmJ6ozIB4.M5w9KLmE1Fzs2g3zT3EcRmgWFb.PjYs88vkkiranjsZQmYTqW3_i5KVkDLzw47BqlTSoKpw3567RnQQ2w0- Received: from [24.5.102.43] by web111611.mail.gq1.yahoo.com via HTTP; Sat, 21 Nov 2009 20:27:26 PST X-Mailer: YahooMailRC/211.6 YahooMailWebService/0.8.100.260964 Date: Sat, 21 Nov 2009 20:27:26 -0800 (PST) From: George Sanders To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: How can I rescue my passwd file after corrupting it (and why does it still work) ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 04:27:28 -0000 I do some automated account creation on a FreeBSD 6.x system ... and unbeknownst to me, the '/' filesystem was completely full when I did my last account creation, resulting in: /: write failed, filesystem is full pwd_mkdb: /etc/pwd.db to /etc/pwd.db.tmp: No space left on device pw: passwd file update: No space left on device pwd_mkdb: corrupted entry pwd_mkdb: at line #187 pwd_mkdb: /mnt/etc/master.passwd: Inappropriate file type or format My situation is now as follows: passwd and master.passwd have a lot of lines missing, and one or two mangled lines toward the end. So a LOT of user accounts are gone. BUT, all of those missing accounts still work. So ... 1) why do all of the accounts that are missing from both passwd and master.passwd continue to work properly (they can authenticate and log in over SSH and so on) ? 2) how can I get back to healthy ? I suspect that somehow my (s)pwd.db files are still healthy ... is it possible to reconstruct complete passwd/master.passwd files using the existing (s)pwd.db files ? Thank you.