This method will use GRUB loader to boot the Linux kernel in single user mode in order to change the root password.
1. Boot up your Linux box and press any key to enter GRUB menu:
2. Select your current kernel version in case you have several and press ‘e’ to enter edit mode:
4. Finally, press ‘b’ to boot the system up. You will get a root console so you can change the password with: