2

That happened after I managed to install Virtual Box.

I found a part of the answer here : http://ubuntuforums.org/showthread.php?t=1376802. I added my user to another group and then lost my user to sudoers group. The joke is I haven't any root or admin account - my current user was the sole user of my Ubuntu desktop.

Steve L
  • 41
  • 4
  • [Drop to the root shell on boot](http://askubuntu.com/questions/92556/how-do-i-boot-into-a-root-shell) and re-add yourself to the admin (adm) group. – Damn Terminal Jul 16 '13 at 23:44
  • What *exactly* did you do when adding to another group? What *exact* command did you run? For example the *erroneous* command `usermod -G cdrom gert` would remove me from all supplementary groups (including `adm`, `sudo`, etc.) and only add me to `cdrom` (besides the primary group). – gertvdijk Jul 16 '13 at 23:59

1 Answers1

6

Yes

It is a common mistake that happens to many people. you probably missed -a flag in your command :)

This is the right command

sudo usermod -a -G vboxusers username

and this is probably what you typed (-a keeps all your previous groups)

sudo usermod -G vboxusers username
sajjadG
  • 597
  • 5
  • 12