One minute
Rocky – change password in GRUB
-
As the system boots, press ESC to bring up the GRUB boot prompt. The prompt happens early in the boot process. If you miss the prompt, you need to restart the server from the control panel and try again.
-
At the GRUB boot prompt, press
E
to edit the first boot option -
Find the kernel line starting with linux
-
Change
ro
torw init=/sysroot/bin/sh
-
Press CTRL+X or F10 to boot into single user mode.
-
Access the system with:
chroot /sysroot
- Now change the password:
passwd
- Run below to force file system relabeling. This is required for systems with SELinux. When you reboot the system, it will relabel the filesystem for SElinux. The reboot may take extra time during this process.
touch /.autorelabel
- Now lets exit, logout and reboot the system
exit
logout
reboot