How To Reset Root Password On RHEL 9

Redhat 9 Logo

This step-by-step tutorial will be helpful for beginners to reset root password on RHEL 9 and Fedora systems.

Note:- Below mentioned steps are officially tested on RHEL 9 and Fedora 36 servers.

How to Reset Root Password on RHEL & Fedora systems?

Step 1: Reboot the Server or power on the server and press the ESC key till the GRUB Menu appears. Select the desired kernel if multiple kernels are installed or select the default kernel and press e to edit the kernel

RHEL 9 Grub Menu

Step 2: Search for the word ro from the kernel parameters and replace it with the below parameters and press ctrl+X to enter into the emergency mode.

rw init=/sysroot/bin/sh
Kernel Paramters 1
Kernel Paramters 2

Step 3: Once the system completely boots into emergency mode, mount the root filesystem in read-write mode

chroot /sysroot
Mount root in rw mode

Step 4: Change the root password with the passwd command, and provide a stronger password twice to set the password.

Alternatively, you can use the below Norton Password Generator link to generate a stronger password

Norton Password Generator

passwd root
Change root passwod

Step 5: Execute the autorelabel command and exit from the emergency mode and reboot the server.

touch /.autorelabel
reboot

Step 6: Once the server booted up log in with the new root password

RHEL 9 Login

Conclusion

From this tutorial, you have learned how to Reset root password for RHEL 9 and Fedora 36 systems.

Do let us know your comments and feedback in the comments section below.

If my articles on TipsonUNIX have helped you, kindly consider buying me a coffee as a token of appreciation

Buy me a coffee

Thank You for your support!!

Leave a Reply

Secured By miniOrange