unfortunate /etc/passwd.pacnew experience leading to broken system
Description:
I ran pacman -Syu
today and the "filesystem" package was updated to 2024.01.19-1, and a /etc/passwd.pacnew file was created containing only the user entry for the "root" user ( which is the state /etc/passwd is in since 8a443108 )
I didn't see any news items regarding this: https://archlinux.org/news/
So I naively replaced /etc/passwd with /etc/passwd.pacnew and rebooted, taking me to an unusable system with systemd/kernel boot logs spammed with "[FAILED] Failed to start Authorization Manager"
I was able to recover my system by booting from an installer USB, arch-chroot
ing in, and running systemd-sysusers
I'm mostly filing this issue so that others can find it if they end up in a similar state
I'm not really sure what could be done better here...
A news post warning users about this?
A pacman/alpm hook that automatically deletes /etc/passwd.pacnew and re-runs systemd-sysusers
when appropriate?