From owner-freebsd-current@freebsd.org Wed Aug 28 21:20:38 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1146EE6B5D for ; Wed, 28 Aug 2019 21:20:38 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Jdv95324z3FkS for ; Wed, 28 Aug 2019 21:20:37 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.92.1 (FreeBSD)) (envelope-from ) id 1i35Mb-000K71-JG; Wed, 28 Aug 2019 22:20:21 +0100 Date: Wed, 28 Aug 2019 22:20:21 +0100 From: Gary Palmer To: Ryan Stone Cc: FreeBSD Current Subject: Re: Lost user database after bungled upgrade Message-ID: <20190828212021.GA66282@in-addr.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 46Jdv95324z3FkS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2019 21:20:38 -0000 On Wed, Aug 28, 2019 at 05:09:35PM -0400, Ryan Stone wrote: > Hi everybody, > > I lost /etc/master.passwd and friends while trying to recover from an > src upgrade gone wrong. I'm trying to run "pkg upgrade -f" to get all > of the users and groups created by packages recreating, but pkg is > hitting an assert related to uids: > > Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0), > function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c, > line 386. > > Is there any way to get past this, or is the system toast? Did you try restoring from the backups under /var/backups? There should be master.passwd in there which can be restored and /etc/passwd and the DB files regenarated with pwd_mkdb (I think, never tried) Regards, Gary