From jayb@polaris.cbbtier3.att.net  Tue Oct 29 03:57:52 2013
Return-Path: <jayb@polaris.cbbtier3.att.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 26EEE2DB
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Oct 2013 03:57:52 +0000 (UTC)
	(envelope-from jayb@polaris.cbbtier3.att.net)
Received: from hrabosky.cbbtier3.att.net (hrabosky.cbbtier3.att.net [12.0.1.25])
	by mx1.freebsd.org (Postfix) with ESMTP id 02BDC250E
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Oct 2013 03:57:51 +0000 (UTC)
Received: from polaris.cbbtier3.att.net (polaris [12.0.1.23])
	by hrabosky.cbbtier3.att.net (Postfix) with ESMTP id 555BF114AF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Oct 2013 03:49:05 +0000 (UTC)
Received: by polaris.cbbtier3.att.net (Postfix, from userid 1001)
	id 3D4188AC06; Tue, 29 Oct 2013 03:49:05 +0000 (UTC)
Message-Id: <20131029034905.3D4188AC06@polaris.cbbtier3.att.net>
Date: Tue, 29 Oct 2013 03:49:05 +0000 (UTC)
From: Jay Borkenhagen <jayb@polaris.cbbtier3.att.net>
Reply-To: <jayb@braeburn.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Jay@polaris.cbbtier3.att.net, "Borkenhagen <jayb"@braeburn.org
Subject: pw(8) returns "pw: user 'foo' disappeared during update" after freebsd-update upgrade
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         183429
>Category:       bin
>Synopsis:       pw(8) returns "pw: user 'foo' disappeared during update" after freebsd-update upgrade
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 29 04:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jay Borkenhagen
>Release:        FreeBSD 9.2-RELEASE i386
>Organization:
myself
>Environment:
System: FreeBSD polaris.cbbtier3.att.net 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386


>Description:
	
	Following a freebsd-update upgrade from 9.1-RELEASE to 9.2-RELEASE,
	the next attempt to run "pw useradd foo" is met with this error:

	pw: user 'foo' disappeared during update

	I do not see this on machines on which I installed 9.2-RELEASE 
	directly from media.

	At this point the state of user 'foo' is inconsistent:

	[jayb@hungo ~]$ sudo pw useradd foo
	pw: user 'foo' already exists
	[jayb@hungo ~]$ sudo pw usershow foo
	pw: no such user `foo'
	[jayb@hungo ~]$ sudo pw userdel foo
	pw: no such user `foo'
	[jayb@hungo ~]$ 

	

>How-To-Repeat:

	Start with a 9.1-RELEASE system, upgrade it to 9.2-RELEASE
	using "sudo freebsd-update -r 9.2-RELEASE upgrade" and
	following the instructions.  It appears that at this point,
	the next attempt to use pw to add a user will fail, even if
	that attempt is being done by adding a new port that
	creates a user, e.g. postfix.  I categorized this as 
	"serious" since it is a latent problem that breaks
	installation of otherwise valid ports.


>Fix:

	I do not know how to fix, i.e. to stop causing the problem.

	Once the situation has developed, the condition can be
	resolved by running vipw(8) to delete the user foo.  At 
	this point the next attempt to run "pw useradd foo"
	succeeds.


>Release-Note:
>Audit-Trail:
>Unformatted:
