How To Reset CentOS 7 Root Password

 

On system reboot press ‘e’ to enter Grub boot screen, change :

ro -> rw    and add net to it the line ”   init=/sysroot/bin/sh   ”  (without “”)


Then execute :

chroot /sysroot

And then to change the root password :

passwd root

Enter the new password twice and press CTRL+X to exit and reboot .


Good Luck

Leave a Reply

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