Ubuntu / Linux Mint – User is not in the sudoers file. This incident will be reported.


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:

id mike
uid=1000(mike) gid=1000(mike) groups=1000(mike),125(vboxusers)

On my Ubuntu 11.10 VM I got a rather different result:

id mike
uid=1000(mike) gid=1000(mike) groups=1000(mike),4(adm),20(dialout)
,24(cdrom),46(plugdev),116(lpadmin),118(admin),124(sambashare)

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
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:mike
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:mike
fax:x:21:
voice:x:22:
cdrom:x:24:mike
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:pulse
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:
sasl:x:45:
plugdev:x:46:mike
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
libuuid:x:101:
crontab:x:102:
syslog:x:103:
fuse:x:104:
messagebus:x:105:
mlocate:x:106:
ssh:x:107:
avahi-autoipd:x:108:
avahi:x:109:
netdev:x:110:
bluetooth:x:111:
lpadmin:x:112:mike
ssl-cert:x:113:
gdm:x:114:
nopasswdlogin:x:115:
pulse:x:116:
pulse-access:x:117:
utempter:x:118:
rtkit:x:119:
admin:x:120:mike
saned:x:121:
sambashare:x:122:mike
mike:x:1000:
couchdb:x:123:
winbindd_priv:x:124:
vboxusers:x:125:mike

All that was left to do was to reboot and the problem was fixed.

Advertisements

5 thoughts on “Ubuntu / Linux Mint – User is not in the sudoers file. This incident will be reported.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s