Last active
March 30, 2026 15:26
-
-
Save m0zgen/07dbd96097a291d2e96ee97f457b11bd to your computer and use it in GitHub Desktop.
Reset root password in Debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Load to GRUB menu (on start system) and press `e` | |
| 2. Find boot parameter like this: | |
| ```bash | |
| linux /boot/vmlinuz .. ro single | |
| ``` | |
| 3. Change `ro` to `rw` and add `init` option `init=/bin/sh` or `init=/bin/bash`, example: | |
| ```bash | |
| linux /boot/vmlinuz .. rw single init=/bin/sh | |
| ``` | |
| 4. Press `Ctrl+X` | |
| 5. Change password `passwd root` | |
| 6. Reboot `Ctrl+Alt+Del` | |
| 7. Enjoy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment