You will likely have to boot off a live CD or some other medium, mount the root partition of your main install, and edit the
/etc/group file and add your user name to the
admin group (that is, find the line starting with
admin and add your user name to the fourth field).
Once that is done, you should be able to boot normally and have sudo privileges. You'll probably want to reinstate your other group memberships. On my system, I have the following:
james (which is also my user name: you should have a group based on yours, and it should be your primary group membership)
You should be able to make these changes in the normal way.
To add a group membership without replacing all the others, the command you should have used is:
sudo usermod --append -G vboxsf fooname