How to reset root password ?

Below are the steps to reset root password in Linux 7 ?

1.  Reboot your machine and at Grub OS Selection Menu, choose the required OS which password needs to reset and press E to edit.

PassReset-1.png (8693 bytes)
2. Edit the kernel line and replace ro to rw and also append init=/sysroot/bin/bash
PassReset-2.png (18756 bytes)
PassReset-3.png (17361 bytes)
3. Now press Control + X to boot the system.
PassReset-4.png (16523 bytes)

4. After getting the # Prompt, issue following command to reset the root password of the system.# chroot /sysroot

# passwd

PassReset-5.png (12824 bytes)
5. Now reboot the system and log in with the password you set.
That’s All !