When using freebsd-update to go from 8.x to 9.0-RELEASE, it adds the "hast" user/group to /etc/passwd /etc/master.passwd /etc/group However, it doesn't run pwd_mkdb afterwards so /etc/pwd.db and /etc/spwd.db don't get updated to contain the new user. hastd won't start (because it can't find its user) until you manually run pwd_mkdb after upgrading. Fix: freebsd-update probably should run pwd_mkdb after an update if it altered the password file. It also might want to run some of the other things that mergemaster does, like cap_mkdb on login.conf and services_mkdb if it's not directly replacing those .db files. How-To-Repeat: Use freebsd-update to upgrade from 8.x to 9.0, then try starting hastd.
I've notice the same thing happen on a number of upgrades using = freebsd-update, and each time the fix has been to manually run pwd_mkdb.=
Responsible Changed From-To: freebsd-bugs->cperciva Over to maintainer.
*** Bug 213374 has been marked as a duplicate of this bug. ***
freebsd-update is supposed to run pwd_mkdb if necessary - see https://svnweb.freebsd.org/changeset/base/173564 I have a first-hand report of this happening recently on an update to 11.x but have not yet reproduced it myself. I'm sure I'll provoke it eventually but if someone can provide exact reproduction steps starting with a FreeBSD VM image I'd appreciate it.
(In reply to Ed Maste from comment #4) In my case it was adding a user immediately after upgrading from 10.3 to 11. I could replicate that on two independent systems I upgraded.
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
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
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:43 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