July 14, 2022

RHEL 9.0 Reset the Root Password

When the boot-loader menu appears, press any key to interrupt the countdown, except the Enter key.

Use the cursor keys to highlight the rescue kernel boot-loader entry (the one with the word rescue in its name).

Press e to edit the current entry.

Use the cursor keys to navigate the line that starts with the linux text.

Press Ctrl+e to move the cursor to the end of the line.

Append the rd.break text to the end of the line.

Press Ctrl+x to boot using the modified configuration.

Press Enter to enter the maintenance mode.

sh-5.1# mount -o remount,rw /sysroot

sh-5.1# chroot /sysroot

sh-5.1# passwd root

sh-5.1# touch /.autorelabel

No comments: