Reset Password
Information¶
I have lost my root pass on Linux more times than I can count. This guide is here so I do not have to Google it lol. Might be useful to you I dunno. But it's here.
Let's do this 🚀¶
How to reset forgotten root password in a GNU/Linux distribution with GRUB
?
If this is a laptop or a desktop which you have next to you then follow these steps.
- Shut down the device.
- Start it again. When you see GRUB menu, press the
e
key on the keyboard before the system starts booting. - In the
GRUB
boot options, scroll down and locate the line that begins withlinux
. In this line move the cursor to the end, right afterro quiet
. Delete everything after that. Changero
torw
. Append the parameterinit=/bin/bash
- Press Ctrl+x, or F10, to boot.
- You will see a root prompt.
Remount the filesystem in read/write mode:
- Set the password of any user(s).
- Reboot with the command
reboot -f
.
That's it ! The new password should work now.