Re: Installing mail/mutt erased a user account

From: Yuri <>
Date: Wed, 19 Apr 2023 20:51:13 UTC
bob prohaska wrote:
> It appears that installing mail/mutt erased a user account. Mutt 
> was compiled locally using poudriere and installed via pkg from the
> local repository. After installation it was still possible to log
> in as the regular user, but su asked "Who are you?" when invoked.

Don't really see how that is possible, mutt doesn't seem to require/add
any user accounts.

> It developed that the original username was absent from /etc/passwd
> and /etc/master.passwd, but the original home directory was present,
> in this case /usr/home rather than /home.
> Re-running adduser as root allowed reinstatement of user login and
> su now behaves normally. Adduser didn't report the account as existing,
> so how login by ssh worked is mysterious and could be indication of
> a recollection error on my part. 

It could still be present in /etc/pwd.db.

> This was on a Pi2 v1.1 running
> FreeBSD 14.0-CURRENT FreeBSD 14.0-CURRENT #22 main-1d35493e46: Tue Apr 18 06:23:00 PDT 2023 arm
> In the meantime sendmail was reinstated as the MTA. That's been done
> before with no ill effects, but it was a near-simultaneous change that 
> might have contributed to the confusion.
> I'll chalk this up to faulty wetware unless advised otherwise.

My guess would be you somehow reverted passwd files to some
default/backup, but didn't run pwd_mkdb?  I just tried that adding test
user using `pw useradd`, setting password for it, and then removed the
line from both passwd files -- I was still able to login via ssh.