From owner-freebsd-questions@freebsd.org Fri Aug 21 03:11:45 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 9AB6C9BE853 for ; Fri, 21 Aug 2015 03:11:45 +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.229]) by mx1.freebsd.org (Postfix) with ESMTP id 60FD2C6A for ; Fri, 21 Aug 2015 03:11:44 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [70.121.59.224] ([70.121.59.224:52398] helo=[192.168.0.4]) by dnvrco-oedge02 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 41/E5-02123-FE696D55; Fri, 21 Aug 2015 03:11:44 +0000 Date: Thu, 20 Aug 2015 22:11:43 -0500 From: Paul Schmehl Reply-To: Paul Schmehl To: FreeBSD Questions Subject: Re: Problem with freebsd-update corrupting /etc/passwd Message-ID: <6E62261B4587BFA6F2F08A2A@Pauls-MacBook-Pro.local> In-Reply-To: <82DB7ED5BD3DDE54744184E2@Pauls-MacBook-Pro.local> References: <1440100869.935695.361630681.4EA48DB2@webmail.messagingengine.com> <0904D22E43B1B6A9D578E512@Pauls-MacBook-Pro.local> <82DB7ED5BD3DDE54744184E2@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.130:25 X-Authority-Analysis: v=2.1 cv=AIjuEwSE c=1 sm=1 tr=0 a=Jnt5oOXMh44BVXcArVZt4A==:117 a=Jnt5oOXMh44BVXcArVZt4A==:17 a=ayC55rCoAAAA:8 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=dAwA3EVQH21ImbJ3t60A: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 03:11:45 -0000 --On August 20, 2015 at 9:56:46 PM -0500 Paul Schmehl wrote: > --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. > After rereading the man page, apparently the /etc/passwd file is *supposed* to be in Version 7 format. I'll lave it to the experts. Apparently I've made much ado about nothing. > 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 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > 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