Have you ever forgotten your root password?
Is your system set by a vendor who didn’t provide you a root password?
The following process will reset it.
When the grub loads, use the keyboard to highlight your OS option and press edit key, which is
usually ‘e’. there will be a line which usually starts with ‘linux’ or ‘kernel’ and ends with ‘single’ or
navigate to the line and click the edit key. at its end, just add the following command:
Now click on Enter and then the key to boot up the system which is usually ‘ctrl+x’ or ‘b’.
you will be logged in as root in ‘Text Mode’. The file in which the password is saved would most
probably be in read-only mode. To change it to read-write mode, use the following command:
sh# mount -o remount ,rw /
now you can change the password using the ‘passwd’ command:
#sh passwd & hit enter
changing password for root.
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
The password has been changed.