(232921) somewhat random pw-related errors following system upgrades (was: freebsd-update(8) without an echo of "You must be root to run this.")

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Sat, 20 Feb 2021 11:48:04 +0000
On 19/02/2021 21:59, Chris Rees wrote:
> Hey,
>
> On 16 February 2021 08:53:29 GMT, Graham Perrin <grahamperrin_at_gmail.com> wrote:
>> <https://cgit.freebsd.org/src/tree/usr.sbin/freebsd-update/freebsd-update.sh?id=48ffe56ac5b7adb5b851d32be12b2ec0f13705a4#n555>
>>
>>          echo "You must be root to run this."
>>
>> Below: is this my PEBKAM, or (with a system that is preconfigured to
>> deny login as root) _should_ there be an echo of the requirement to run
>>
>> as root?
>>
>> ----
>>
>> mowa219-gjp4-vm-hellosystem-eol-freebsd% su -
>> Password:
>> su: Sorry
>> mowa219-gjp4-vm-hellosystem-eol-freebsd% sudo grep LOCKED
>> /etc/master.passwd
>> root:*LOCKED*:0:0::0:0:Charlie &:/root:/bin/csh
>> mowa219-gjp4-vm-hellosystem-eol-freebsd% sudo freebsd-update upgrade -r
> Sudo means that you are root.  *LOCKED* just disables the root password.
>
> Chris

Thanks for the clarification.

----

As background: I spent many hours repeatedly testing freebsd-update 
upgrade from 12.1-RELEASE to 12.2-RELEASE-p3 (and greater) in virtual 
machines, trying to understand why (a bug) mysql57-server would not 
install following an upgrade with the root password _disabled_.

Later tests included multiple consecutive successes (bug-free) with the 
root password _enabled_ – enough consecutive successes for me to assume 
that the bug was somehow caused by the *LOCKED* aspect.

That period of consistent success was followed by reproduction of the 
bug with the root password _enabled_, at which point I realised the 
wrongness of my assumption. Confused by the randomness, I began to 
wonder whether – in rare situations – sudo might be not entirely effective.

Eventually I realised, the failures to install mysql57-server were 
symptomatic of FreeBSD bug 232921 
<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232921>, which 
involves pwd_mkdb(8).

I'll not attempt to understand why bug 232921 was not consistently 
reproducible during my tests, but I'm glad that it's unrelated to 
disabling the root password; and I no longer doubt the usefulness of 
sudo :-)
Received on Sat Feb 20 2021 - 10:48:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC