Bug 213374

Summary: Adding users broken after upgrade from 10.3 to 11 (with freebsd-update)
Product: Base System Reporter: VK <vlad-fbsd>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed DUPLICATE    
Severity: Affects Only Me Keywords: regression
Priority: ---    
Version: 11.0-STABLE   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165954

Description VK 2016-10-11 11:38:01 UTC
After upgrade from 10.3 to 11.0-RELEASE-p1 I noticed that adding users breaks like this:

# pw useradd testusr -m
pw: user 'testusr' disappeared during update

# grep testusr /etc/passwd
testusr:*:1002:1002:User &:/home/testusr:/bin/sh

# grep testusr /etc/master.passwd
testusr:*:1002:1002::0:0:User &:/home/testusr:/bin/sh

# id testusr
id: testusr: no such user

# pw userdel testusr -r
pw: no such user `testusr'

# pwd_mkdb -p /etc/master.passwd

# id testusr
uid=1002(testusr) gid=1002(testusr) groups=1002(testusr)

Possibly same issue as bug #165954, as the upgrade process did add/change some user groups...
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2016-10-22 19:54:08 UTC
It is for sure the same issue as the one you pointed, it is the case until one run pw_mkdb for the first time then it disappears.

I have no idea what causes it
Comment 2 VK 2016-12-19 23:55:32 UTC

*** This bug has been marked as a duplicate of bug 165954 ***