From owner-freebsd-questions@freebsd.org Fri Aug 21 02:56:49 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DC489BE3EF for ; Fri, 21 Aug 2015 02:56:49 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from dnvrco-oedge-vip.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.232]) by mx1.freebsd.org (Postfix) with ESMTP id C72121F89 for ; Fri, 21 Aug 2015 02:56:48 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [70.121.59.224] ([70.121.59.224:52078] helo=[192.168.0.4]) by dnvrco-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id A7/96-15806-E6396D55; Fri, 21 Aug 2015 02:56:47 +0000 Date: Thu, 20 Aug 2015 21:56:46 -0500 From: Paul Schmehl Reply-To: Paul Schmehl To: Paul Smith cc: Mark Felder , FreeBSD Questions Subject: Re: Problem with freebsd-update corrupting /etc/passwd Message-ID: <82DB7ED5BD3DDE54744184E2@Pauls-MacBook-Pro.local> In-Reply-To: References: <1440100869.935695.361630681.4EA48DB2@webmail.messagingengine.com> <0904D22E43B1B6A9D578E512@Pauls-MacBook-Pro.local> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-RR-Connecting-IP: 107.14.64.142:25 X-Authority-Analysis: v=2.1 cv=Bs0TwOn5 c=1 sm=1 tr=0 a=Jnt5oOXMh44BVXcArVZt4A==:117 a=Jnt5oOXMh44BVXcArVZt4A==:17 a=ayC55rCoAAAA:8 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=BjzWi6W6KFpIPm6pwsoA:9 a=CjuIK1q_8ugA:10 X-Cloudmark-Score: 0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2015 02:56:49 -0000 --On August 20, 2015 at 8:39:17 PM -0600 Paul Smith wrote: >> >> The top three lines of the file (that I renamed .bak because it was >> corrupted) are: >> >> # cat /etc/passwd.bak >> # $FreeBSD: releng/10.2/etc/master.passwd 256366 2013-10-12 06:08:18Z >> # rpaulo >> $ >> # >> root:*:0:0:Charlie &:/root:/bin/csh >> >> # pwd_mkdb -C /etc/passwd.bak >> pwd_mkdb: corrupted entry >> pwd_mkdb: at line #3 >> pwd_mkdb: /etc/passwd.bak: Inappropriate file type or format >> > > I thought you ran pwd_mkdb on /etc/master.password and not /etc/password. > >> From the man page for pwd_mkdb: > > Regenerate the password database after manually editing or replacing > the password file: > /usr/sbin/pwd_mkdb -p /etc/master.passwd > Doing that corrupts the file in exactly the same way that they were corrupted. # pwd_mkdb -p /etc/master.passwd [root@mail /var/spool/spam]# ls -lsa /etc/passwd 4 -rw-r--r-- 1 root wheel 2615 Aug 21 02:50 /etc/passwd [root@mail /var/spool/spam]# ls -lsa /etc/master.passwd 4 -rw------- 1 root wheel 3105 Aug 20 03:33 /etc/master.passwd [root@mail /var/spool/spam]# pwd_mkdb -C /etc/passwd pwd_mkdb: corrupted entry pwd_mkdb: at line #3 pwd_mkdb: /etc/passwd: Inappropriate file type or format -p creates the file in Version 7 format, which is incorrect for 10.2-RELEASE. Paul Schmehl, Retired As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson "There are some ideas so wrong that only a very intelligent person could believe in them." George Orwell