In my previous post I followed documentation for VirtualBox to get USB working in my Virtual Machines (VM) and issued the following command: sudo usermod -G vboxusers mike. This command resulted in this error message when I subsequently tried to use the sudo command:
mike is not in the sudoers file. This incident will be reported.
I could no longer issue sudo commands – but all was not lost.
I decided to compare the user permissions on my now broken Linux Mint installation to the user permissions on my Ubuntu 11.10 VM that I had just installed (prior to running the command that broke things). I assumed that the settings between the two would be close enough – but given more time I probably have installed Linux Mint in a VM to make the comparison.
On broken Linux Mint system I issued the id username command:
uid=1000(mike) gid=1000(mike) groups=1000(mike),125(vboxusers)
On my Ubuntu 11.10 VM I got a rather different result:
uid=1000(mike) gid=1000(mike) groups=1000(mike),4(adm),20(dialout)
These permissions are contained in the file /etc/group and so I used the output from the Ubuntu VM as a guide to fixing permissions in /etc/group on Linux Mint. It should be noted that the Linux Mint and Ubuntu versions of /etc/group are not identical – so pay attention when editing this file.
To edit /etc/group I rebooted and selected the recovery mode option from the grub boot menu. I then chose the option to drop into a root prompt and supplied my user password as credentials.
I then edited /etc/group with nano and appended my username to the entries that I needed to correct.
sudo nano /etc/group
For example, I changed adm:x:4: to adm:x:4:mike. As you can see below the numerical sequence is not the same as for my Ubuntu VM but it is straight-forward enough to see which lines to append with your username.
#My amended /etc/group file on Linux Mint
All that was left to do was to reboot and the problem was fixed.