try to install ntopng on fresh system.
13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021 email@example.com:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
pkg install ntopng
New packages to be INSTALLED:
Number of packages to be installed: 1
The process will require 43 MiB more space.
Proceed with this action? [y/N]: y
[1/1] Installing ntopng-4.2.d20210309,1...
===> Creating groups.
Using existing group 'ntopng'.
===> Creating users
Creating user 'ntopng' with uid '288'.
pw: user 'ntopng' disappeared during update
pkg: PRE-INSTALL script failed
The pkg software uses the pw(8) utility to create users during package insstallation. The package can only indicate which user it requires and those tools do all the actual job.
The error message you're getting s actually generated by pw(8), you can check it's source code at `/usr/src/usr.sbin/pw/pw_user.c` lines 1451 and 1813:
errx(EX_NOUSER, "user '%s' disappeared during update", name);
I don't know exactly the cause in your case, but in my experience the most frequent cause is a misalignment between the passwd, master.passwd files and the related db and shadow db files.
You can use pwd_mkdb(8) to force regenerating the DB files before running pkg like this:
/usr/sbin/pwd_mkdb -p /etc/master.passwd
(this is the suggested command line in pwd_mkdb(8))
You can also just call vipw as root, then, changing nothing, save and exit, so DBs are regenerated. (it calls pwd_mkdb in the background after you exit the editor if the file was touched)
Ti go any deeper I think you should file a bug report against pw(8), but before that you should investigate why the error happens, maybe pw(8) should try harder to generate better error messages.
Thank you, this is help