reset root password of a virtual machine

Asked by Simone Mura

I removed (distrattament) my "sudo" user from sudo group user,
i cann't use root because I don't know a passord for root.

I've virtual machine Ubuntu and when I open Recovery Menu is limited read-only menu.
If i select "root Drop to root shell prompt"
the message is "Give root password for maintenace" ... but i don't know a root passwrd :(

How can I reset root password?

Question information

English Edit question
Ubuntu shadow Edit question
No assignee Edit question
Solved by:
Warren Hill
Last query:
Last reply:
Revision history for this message
Best Warren Hill (warren-hill) said :
Revision history for this message
Simone Mura (simonemura) said :

Thank you very much Warren,

The procedure is "The Other Way Lucid":

1. Reboot your computer

2. Hold shift during boot to start GRUB menu

3. Highlight your image and press 'e' to edit

4. Find the line starting with linux and append init=/bin/bash at the end of that line

5. Press ctrl-x to boot.