From nobody Fri May 26 18:03:19 2023 X-Original-To: freebsd-current@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 4QSXpg5qF1z4Ck8X for ; Fri, 26 May 2023 18:03:23 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (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 "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QSXpg3rmgz4F4t for ; Fri, 26 May 2023 18:03:23 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 34QI3K2D068170; Fri, 26 May 2023 13:03:20 -0500 (CDT) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1685124200; bh=BM1HRnPB5h6DYkMO3dzJgHEB0YVpV/ifxvBK0Ep2WTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CDlLE3BtwSqayYxhK8uai57iWdmTQBaYist9i3scYAfXRBEemBiLrrBnAh36lNAYI smuSVrl2XBxlmqnkhZZHu7n3D4ZTbYM4TwR73+63Bf3efKDbHsftsqSOavE5OIURNo uU1kRcSkDwuDKzgfM3zaLLw8w7S5qpJGVLKC0WQCu2FHnonEGqVxL38JRTQbZDx6IX c1uqs3GH++M+ZRhAXYN1gdQa17i+f5D49Ds1zUb1MMqGWdDHOIJuvS75CcCGPk5vbb i7YuDR/UzBykDiau4ofE/fHqSSMIlFiVsuR7nFpY0FpPU1bUuxNKVwVGgWdTQ6BaD9 hrUdjHLwIvgxg== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id 9EQ0H2j0cGRICgEAs/W3XQ (envelope-from ); Fri, 26 May 2023 13:03:20 -0500 From: Mike Karels To: bob prohaska Cc: freebsd-current@freebsd.org Subject: Re: Surprise null root password Date: Fri, 26 May 2023 13:03:19 -0500 X-Mailer: MailMate (1.14r5964) Message-ID: <945C9B6D-F2A8-4F0D-BDB0-49A3DE870168@karels.net> In-Reply-To: References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QSXpg3rmgz4F4t X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 26 May 2023, at 12:35, bob prohaska wrote: > While going through normal security email from a Pi2 > running -current I was disturbed to find: > > Checking for passwordless accounts: > root::0:0::0:0:Charlie &:/root:/bin/sh > > The machine had locked up on a -j4 buildworld since > sending the mail, so it was taken off the net, power > cycled and started single-user. > > Sure enough, /etc/master.passwd contained a > null password for root, but the last modification > to the file was two weeks ago according to ls -l. > > Stranger still, when fsck'd and brought up multi-user, > the normal password was still honored and a null > password rejected for both regular and root account. > > AFAIK, /etc/master.passwd is _the_ password repository, > but clearly I'm wrong. /etc/master.passwd is the source, but the operational database is /etc/spwd.db. You should check the date on it as well. You can rebuild it with “pwd_mkdb -p /etc/master.passwd”. Mike > If somebody can tell me what's going on and what to > check for before placing the machine back on line > it would be much appreciated. > > Thanks for reading, > > bob prohaska