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
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
@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.
@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
@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.
Any luck adding enforcing=0 after rd.break ?
Don't forget to eneble SELinux when done.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.