Re: Installing mail/mutt erased a user account
- In reply to: Yuri : "Re: Installing mail/mutt erased a user account"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Apr 2023 22:46:57 UTC
On Wed, Apr 19, 2023 at 10:51:13PM +0200, Yuri wrote: > 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. > Nor do I. > > 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. I certainly didn't deliberately alter the password files at the time of installing mutt. I did rmuser the freebsd user account and then adduser the account that went missing, but that was at the initial setup, long ago. Your experiment explains how I logged in with the non-existent username, which is some comfort. But, little else of this story makes sense. Thanks for writing, bob prohaska