How do you reset a forgotten root password on RHEL 9?

1. At the GRUB menu press e and append rd.break to the linux line, then Ctrl+X. 2. bash mount -o remount,rw /sysroot chroot /sysroot passwd root touch /.autorelabel exit; exit

The /.autorelabel file makes SELinux relabel the changed /etc/shadow on boot.