
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,591 Views
forgotten root password not working
Hi there! I am currently learning RHEL 9 and I've run into an issue. After attempting to reset root password using the below steps, I am now being prompted to create a new user every time I start or reboot the system. Unfortunately, I am unable to access the terminal to troubleshoot the problem. Is there anyone who can offer some guidance or assistance with this issue? Any help would be greatly appreciated!
Boot with 'rd.break' argument
- Press 'e' to start editing for Rescue kernel
- Scroll down to the "linux" line. This line tells GRUB 2 to boot with rescue kernel.
- Move to the end of the line. Add the string "rd.break" to the end after the space.
- (Optional but recommended) If you want to see as you type-in, you have to also remove the "rhgb quiet" part of that line.
- Once you have finished that change, press Ctrl-x to accept the edit, and to boot using that rescue kernel
You would reach to screen shown below, just press Enter to get the shell
Press Enter for maintenance (or press Control-D to continue):
The file system is mounted read-only on /sysroot/. You will not be allowed to change the password if the file system is not writable. Remount the root filesystem in read-write mode:
sh-5.1# mount -o remount,rw /sysroot
The file system is remounted with write enabled. Change the file system’s root as follows:
sh-5.1# chroot /sysroot
Enter the passwd command and follow the instructions displayed on the command line to change the root password.
sh-5.1# passwd
Updating the password file results in a file with the incorrect SELinux security context. To relabel all files on next system boot, enter the following command:
sh-5.1# touch /.autorelabel
Exit the chroot environment:
exit
Exit the switch_root prompt:
exit

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,571 Views
@MonsterbabyHack were you not able to follow the steps you mentioned in the post ? What is the error that you are facing ? Do you have a screenshot of the error ? is this something happening in the course labs or in your own home/work lab /system ?
If you are following the steps , you should get a rescue shell at step 2.
We can help more if we know what is happening there for you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,545 Views
@Chetan_Tiwary_ "I was able to follow the steps mentioned in the post and completed them successfully. However, I am facing an issue after completing those steps. I am using VMware on my home lab system. I have included the link to the issue I am facing below. Could you please take a look at it? Thank you." Video of the issue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,534 Views
@MonsterbabyHack in your video I am not able to see any root password resetting - all I can see is a boot process stuck here :
seems like more of an OS config issue. Boot with the rescue kernel and see journal logs using journalctl -xb to see any error logs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,490 Views
Any luck adding enforcing=0 after rd.break ?
Don't forget to eneble SELinux when done.