Reset
Forgotten Root Password in RHEL 9
Entering
into a chroot environment in order to reset the root password for RHEL 9 beta
can now be done under the rescue boot parameters.
In
addition, the current documentation for RHEL 9 beta -Chapter 23.3 - Procedure
#4 : The procedure states that "The
switch_root prompt appears". This is also no longer applicable.
After
entering rescue mode and pressing the Enter key for maintenance, the sh-5.1#
prompt now appears immediately. After this step, all following steps on current
documentation can now be done successfully.
New
Steps:
1.
Reboot the system and, on the GRUB 2 boot screen, use the down arrow key on
your keyboard to select rescue mode. Press the
e key to interrupt the boot
process.
Red Hat Enterprise Linux
(0-rescure-XXXXXXXXXXXXXXXXXXXXXXXXXX) 9.0
2.
Go to the end of the line that starts with linux.
3.
Add rd.break to the end of the line that starts with linux.
4.
Press Ctrl+x to start the system with
the changed parameters.
5.
Press the Enter key to enter maintenance
mode.
The
sh-5.1# prompt appears.
6.
Remount the file system as writable:
# mount -o remount,rw /sysroot
7.
Enter the chroot environment:
# chroot /sysroot
8.
Reset the root password:
# passwd
9.
Enable the SELinux relabeling process on the next system boot:
# touch /.autorelabel
10.
Exit the chroot environment:
# exit
11.
Exit maintenance mode:
# exit
-----------------------------------------
Comments
Post a Comment