ubuntu server how to boot to "recovery mode"
14,723
Solution 1
I think you need to hold down the SHIFT key during boot and this should present you with the option to boot to recovery mode.
EDIT: (Assuming it is a single and not a dual boot system)
Solution 2
Once you're in, you don't edit the visudo file; you can either
- use
visudo
(assuming you know how to usevi
, or doEDITOR=nano visudo
(or whatever editor)), which safely edits/etc/sudoers
and does sanity checking before saving addgroup <username> admin
, since the admin group is in thesudoers
file
Of course, you shouldn't add yourself to the admin group if you weren't in it to start with... which won't be a problem if it's your server...
Related videos on Youtube

Comments
-
AntonioCS 3 months
I accidentally removed my user from the sudo group.
A friend of mine told me to go into recovery mode and edit the visudo file.
The problem is, I don't know how to get into recovery mode. Can anyone please tell me how to do this? I am on ubuntu server 10.04 64bit.
Thanks
-
AntonioCS over 12 yearsIt is a single boot. Thanks I will try this when I get home :)
-
AntonioCS over 12 yearsThanks! I was in the admin group I just used usermod -G without -a, and yes the server is mine. It's just a small home server.