Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2023 22:51:13 +0200
From:      Yuri <yuri@aetern.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: Installing mail/mutt erased a user account
Message-ID:  <648cb930-7708-5032-74a8-471ae4353a6e@aetern.org>
In-Reply-To: <ZEAdm4PjLcVUzi4y@www.zefox.net>
References:  <ZEAdm4PjLcVUzi4y@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 www.zefox.com 14.0-CURRENT FreeBSD 14.0-CURRENT #22 main-1d35493e46: Tue Apr 18 06:23:00 PDT 2023     bob@www.zefox.com:/usr/obj/usr/src/arm.armv7/sys/GENERIC 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?648cb930-7708-5032-74a8-471ae4353a6e>