sudo ls as user1 and I got this message.
Sorry, user user1 is not allowed to execute '/bin/ls' as root on hostname.
And this is my user1 group info and sudoers file.
user1@hostname:$ id uid=1000(user1) gid=1000(user1) groups=1000(user1),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),110(lpadmin),111(sambashare) user1@hostname:$ cat /etc/sudoers Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL
I don't know what changes I made before this problem occurred. My system is Ubuntu 14.04.5 (DigitalOcean).