reset root password of a virtual machine

Asked by Simone Mura on 2013-04-25

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

Language:
English Edit question
Status:
Solved
For:
Ubuntu shadow Edit question
Assignee:
No assignee Edit question
Solved by:
Warren Hill
Solved:
2013-04-25
Last query:
2013-04-25
Last reply:
2013-04-25
Simone Mura (simonemura) said : #2

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.