Skip to content

Instantly share code, notes, and snippets.

@m0zgen
Last active March 30, 2026 15:26
Show Gist options
  • Select an option

  • Save m0zgen/07dbd96097a291d2e96ee97f457b11bd to your computer and use it in GitHub Desktop.

Select an option

Save m0zgen/07dbd96097a291d2e96ee97f457b11bd to your computer and use it in GitHub Desktop.
Reset root password in Debian
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