Reset Centos 8 root password

reboot the server

at grub menu, press up/down to pause auto booting

select top menu item, press e (to edit)

in editing menu, go to end of line starting with “linux” and add “rd.break”

press control-x to boot using this edited grub command line

when the server starts you should not have to login

at the prompt, type :

mount -o remount,rw /sysroot/
chroot /sysroot
passwd root
shutdown -r now

Leave a comment

Your email address will not be published. Required fields are marked *