From nobody Wed Apr 19 22:46:57 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1wrv3Pkhz45LVf for ; Wed, 19 Apr 2023 22:46:55 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1wrt0jNwz410S for ; Wed, 19 Apr 2023 22:46:53 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 33JMkvr3025391 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 19 Apr 2023 15:46:57 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 33JMkvQS025390; Wed, 19 Apr 2023 15:46:57 -0700 (PDT) (envelope-from fbsd) Date: Wed, 19 Apr 2023 15:46:57 -0700 From: bob prohaska To: Yuri Cc: freebsd-ports@freebsd.org Subject: Re: Installing mail/mutt erased a user account Message-ID: References: <648cb930-7708-5032-74a8-471ae4353a6e@aetern.org> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <648cb930-7708-5032-74a8-471ae4353a6e@aetern.org> X-Rspamd-Queue-Id: 4Q1wrt0jNwz410S X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 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