It looks like the compiled password databases are corrupted. You could remove them and then rebuild them. See
pwd_mkdb(8)
Code:
/etc/pwd.db The insecure password database file.
/etc/pwd.db.tmp A temporary file.
/etc/spwd.db The secure password database file.
/etc/spwd.db.tmp A temporary file.
BTW adding a new user probably is the easiest way to rebuild those databases.