Accessing to recovery and changing root password on Ubuntu

If you forgot your root password you can reset the password with this instructions:

  • Reboot your Server/PC and press Shift or Esc depending toyour system.
  • Press "e" from keyboard at the GRUP screen.
  • Go to the line that begins with "linux" and delete the rest of the line starts with "ro" and then add this command: rw init=/bin/bash

Before: linux /boot/vmlinuz-2.6.37-12-generic root=UUID=36286167-4eba-4a1e-a202-155c6baafa01 ro vt.handoff=7 quiet

After: linux /boot/vmlinuz-2.6.37-12-generic root=UUID=36286167-4eba-4a1e-a202-155c6baafa01 rw init=/bin/bash

  • Reboot with"ctrl-x" or "F10".

Now you are in command line with root access.

  • You can reset password of root with "passwd root" command.