Disclaimer: This how-to details procedures for gaining root access to linux boxes. If the linux box is not yours, get the (written) permission of the owner… it’ll save you a lot of trouble. I will not be responsible for anything illegal you do with the stuff you learn on this page.🙂
Okay, so you lost your password? It’s not the end of the world. But first you need physical access to the box.
1. Boot the machine (and press escape at the GRUB menu loading stage if the menu is hidden).
2. Select the correct entry for booting into your linux system – it usually is the first item and is probably already selected – and press “e” on your keyboard.
3. Select the line that begins with kernel and press “e”on your keyboard to edit it.
4. Now navigate to the end of this line, leave a space and type:
rw single init=/bin/bash.
5. Press “enter” then “b” on your keyboard and wait for the system to boot and give you a command prompt.
6. Now you need to use the passwd command to change your password. Do:
Replace $user with your username
7. Enter and confirm a new password when prompted, and reboot the machine with the reboot command. I sometimes get an error message when I try to reboot; if you run into the same problem, use the power switch.😀
8. That’s it, you’re okay.🙂