📅 Wednesday, 11 February 2026

🕐 8:51 PM

2ways:

Official recomm by redhat:

How to recover a root password in Red Hat-based Linux systems

Manually Hijack PID1 and reset root (way more hectic but not recommended lol)

  • rebooted guest OS edit Default kernel

  • press e > line starting with linux (for rhel 8 atleast)

  • append init=/bin/bash to end of line

  • Ctrl+x to boot

  • should boot directly into /bin/bash shell

  • mount -o remount,rw /

  • passwd

  • touch /.autorelabel

  • /sbin/reboot -f