Solved Schizophrenic `pw'

Hi guys,
I've tried to install sysutils/munin-node from ports but it failed at user creation stating User munin nonexistant. Create the user and retry. From it's makefile I learned that it cheks if the user exists with pw user show munin, with expected result pw: no such user `munin'. But when I tried to create user manually I got this:
Code:
pw useradd munin -u 842 -c Munin -g munin -d /var/munin -s /usr/sbin/nologin
pw: user 'munin' already exists
.
Furthermore there are records in /etc/passwd and /etc/group of the user and group respectively.
passwd file: http://pastebin.com/tVSY5Hrg
group file: http://pastebin.com/34JjcXLr
Code:
uname -a
FreeBSD #hostname# 9.3-RELEASE-p33 FreeBSD 9.3-RELEASE-p33 #0: Wed Jan 13 17:55:39 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Can some help me how to solve this? I can't see any sane reason for `pw' behavior.

Thank you,
Heretiiik.
 
This happens from time to time, the /etc/passwd gets out of sync with the actual accounts database. The quickest and easiest solution is to run vipw, don't change anything but do save and quit. The save will trigger a sync with the accounts database.
 
Back
Top