Closed miabbott closed 10 months ago
Based on investigations in https://github.com/ublue-os/main/issues/469, one set of instructions that seem to work for resetting normal user passwords and the root password are:
rd.break enforcing=0
to the end of itmount -o remount rw /sysroot
/sysroot/usr/sbin/chroot /sysroot
passwd [your username here]
restorecon /etc/shadow
as rootsetenforce 1
to re-enable SELinuxI'm not sure if this is the best way to achieve the results, but it appears to be successful.
Thanks to Colin, there is also another option and will be simpler to execute: https://github.com/ublue-os/main/issues/469#issuecomment-1885264886
When trying to follow the instructions on resetting the root password using rescue mode, I found that I'm unable to login with my user account or root account afterwards.
rw init=/bin/bash
to thelinux
line in the boot entry.passwd
to configure the root password from the resulting shell.touch /.autorelabel
does not work with ostree-based hosts, I tried using/sbin/restorecon -v /etc/{passwd,shadow}
(see https://github.com/coreos/fedora-coreos-docs/pull/48) to fix any SELinux labeling before using/sbin/reboot -f
.I was unable to observe any errors on the console during the login attempts.