Reset Root Password

If you forgot your root password on Linux, follow these steps to recover:

  1. Interrupt grub boot

  2. Enter grub boot configuration by pressing e

  3. Edit the kernel boot command and append init /bin/bash

  4. Boot with Ctrl-x

  5. By default, the root file system is mounted read only. Remount it with rw: mount -o remount,rw /dev/vda1 /

  6. Change your password: passwd

  7. Reboot and re-enjoy your machine with root access :-)