Friday, December 24, 2021

What to do if you forget your password and even root password?

 If you forget your password and even the root password, you can stare into a blank login screen not knowing what to do. Here is one break for that situation.

While you are at Grub , instead of clicking enter on your linux distribution or kernel, click E, this will take you to edit mode for starting of that kernel. Try to find one line with "quiet" in the end. At the end of this line append init=/bin/bash and press F10 to boot further into single mode. 

The single user mode directly takes you to the root user. type passwd root at the prompt to set the new password for root. 

If you get error like "Authentication token manipulation error" or if root@none:/ is shown at the prompt, then, type the following command

mount -o remount, rw/

this will remount the filesystem and will allow to change the root password. 

No comments: