After updating multiple machines from 10.3 to 11.2 using freebsd-update(8), they all suffer from the same problem: # pw useradd -n removemenow -u 3333 -g nobody -s /bin/false -h - pw: user 'removemenow' disappeared during update At this point removemenow is in /etc/master.passwd and I can also find traces of it in pwd.db, yet: # id removemenow id: removemenow: no such user Running # pwd_mkdb -p /etc/master.passwd fixes the issue, but this is quite irritating. Also note that pwd.db has the time timestamp as master.passwd after the update (so something got rewritten there) and it also changes after running "pw". This is most likely a duplicate of #165954, still opening it, as it affects 11.2-RELEASE (and therefore should probably be mentioned in RELEASE ERRATA).
A commit references this bug: Author: emaste Date: Mon Jan 21 19:04:38 UTC 2019 New revision: 343270 URL: https://svnweb.freebsd.org/changeset/base/343270 Log: freebsd-update: Update /etc/passwd after password db changes Add -p to pwd_mkdb in order to ensure password db changes are also included in /etc/passwd. PR: 165954, 232921, 229487 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reviewed by: jilles MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18827 Changes: head/usr.sbin/freebsd-update/freebsd-update.sh
Who would've thought. Closing the ticket, as this sounds like the proper fix.
A commit references this bug: Author: emaste Date: Tue Mar 5 18:29:26 UTC 2019 New revision: 344809 URL: https://svnweb.freebsd.org/changeset/base/344809 Log: MFC r343270: freebsd-update: Update /etc/passwd after password db changes Add -p to pwd_mkdb in order to ensure password db changes are also included in /etc/passwd. PR: 165954, 232921, 229487 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reviewed by: jilles Sponsored by: The FreeBSD Foundation Changes: _U stable/12/ stable/12/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Tue Mar 5 18:30:44 UTC 2019 New revision: 344810 URL: https://svnweb.freebsd.org/changeset/base/344810 Log: MFC r343270: freebsd-update: Update /etc/passwd after password db changes Add -p to pwd_mkdb in order to ensure password db changes are also included in /etc/passwd. PR: 165954, 232921, 229487 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reviewed by: jilles Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/usr.sbin/freebsd-update/freebsd-update.sh