From owner-freebsd-questions@freebsd.org Thu Aug 20 23:34:59 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 2DE079BF2FD for ; Thu, 20 Aug 2015 23:34:59 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EBE1510B9; Thu, 20 Aug 2015 23:34:58 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: by iodb91 with SMTP id b91so64027781iod.1; Thu, 20 Aug 2015 16:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L0ed9Ma6N/SvvpFjdBtCtb6Tp151fWGOCZ/676HPChQ=; b=OeXm/OL9EBxgAMDRNZCPDRnSzD/3uSr/2J7qhlci5Y5+Iy/FlrnLiji4F0T5XlFyhS geZ37Yt+2iAs5LrIaXu3hNAxfuFb28qTc1ET7wsqkgGjPYflWsW4jNcdIVV0w9HzYxSx E4JD1nSHrzdkRdGAUKbs3ugbLxTpNQsbReGSAmU63gl8VayzUCBuQ6pWJaVLRTZkz/Z5 r5yNHEgOqtQxbRirr+jalvso1wIssahoc/QB3fQnURltuLgcAqBnEI3AGFGwEnVe0mkr KqogfNu+RC/yVqGnUTFhhIwxVJUOtbemRv15QgFIXX/pVp2K+rRUEFJCkeUXeGtDUZ2E pI/g== MIME-Version: 1.0 X-Received: by 10.107.7.168 with SMTP id g40mr5626617ioi.28.1440113697727; Thu, 20 Aug 2015 16:34:57 -0700 (PDT) Received: by 10.36.101.79 with HTTP; Thu, 20 Aug 2015 16:34:57 -0700 (PDT) In-Reply-To: <0904D22E43B1B6A9D578E512@Pauls-MacBook-Pro.local> References: <1440100869.935695.361630681.4EA48DB2@webmail.messagingengine.com> <0904D22E43B1B6A9D578E512@Pauls-MacBook-Pro.local> Date: Thu, 20 Aug 2015 18:34:57 -0500 Message-ID: Subject: Re: Problem with freebsd-update corrupting /etc/passwd From: Adam Vande More To: Paul Schmehl Cc: Mark Felder , FreeBSD Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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: Thu, 20 Aug 2015 23:34:59 -0000 On Thu, Aug 20, 2015 at 5:56 PM, Paul Schmehl wrote: > --On August 20, 2015 at 3:01:09 PM -0500 Mark Felder > wrote: > > >> >> On Thu, Aug 20, 2015, at 14:17, Paul Schmehl wrote: >> >>> I just upgraded two servers from 8.4-RELEASE to 10.2-RELEASE. On both >>> servers I had a problem with the /etc/passwd file after upgrade. >>> >>> This is what I got on both servers: >>> >>> # pwd_mkdb -C /etc/passwd >>> pwd_mkdb: corrupted entry >>> pwd_mkdb: at line #3 >>> pwd_mkdb: /etc/passwd: Inappropriate file type or format >>> >>> On one server a single user "disappeared" (getent passwd username >>> returned >>> nothing). On the other server, after I replaced it with >>> /etc/masster.passwd, I looped through the /etc/passwd file and getent >>> returned each entry, so no users "disappeared". >>> >>> Not sure what the problem might be, but I thought y'all should know. >>> >>> >> During the upgrade did it ask you to merge some config files (passwd >> included) ? That's the only time it would do so. Corruption on line #3 >> makes me think it was trying to make you manually merge the FreeBSD ID / >> timestamp at the top of the file. >> > > No. The only two files I was prompted to edit were /etc/motd and > /etc/newsyslog.conf. /etc/password was displayed, but it appeared to be > fine to me, so I responded yes to the merge. All it did was add the > unbound account. > > 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'd be happy to send the file to someone who could analyze it. > There is no need to analyze the file as line #3 is clearly incorrect. The question is how it got into that format. Do you have a pre-upgrade backup? -- Adam