Solved pkg-static: Unable to drop privileges

Hi, after upgrading from FreeBSD 12.2 to 12.2-p2 from source, I messed up the mergemaster -Ui part, removing my user and all users created by ports installation like avahi, dbus, hal, polkit, etc. Since those are needed for a lot of stuff like running a window manager I'm stuck with the tty for now.

So I tried to reinstall them from ports with portmaster but I get this error:
pkg-static: Unable to drop privileges: No such file or directory

When trying a simple pkg update I get this:
pkg-static: Unable to drop  privileges: No error: 0
pkg-static: No signature found
Unable to update repository FreeBSD
Error updating repositories!
The return code is 70.

I ran fsck multiple times in single-user mode at this point I'm sure the filesystem is clean.
I disabled tmpfs but no differences either.

Do you know how to fix this error so I can use my work computer again ?
for those like me who reached here but still does not succeed, maybe recreating the pwd.db helps. See pwd_mkbd(8):

pwd_mkdb -p /etc/master.passwd