Q: (Admin) is not in the sudoers file. This incident will be reported.
So I got a Mac on OS X El Capitan and I am having trouble using sudo from the admin; yes the main admin, I repeat, ADMIN account. Each time I use a sudo command the error message pops up.
"(Admin name) is not in the sudoers file. This incident will be reported."
How can I fix this? This ain't ordinary.
MacBook Pro with Retina display, OS X Yosemite (10.10.5), Once running OS X El Capitan Beta
Posted on Jun 27, 2016 4:18 AM
Is the account you are using a member of the 'admin' group
id -a
look for '80(admin)' in the list of groups.
If not, then check System Preferences -> Users & Groups to see if 'Admin' is listed under the account username.
If your account is a member of the '80(admin)' group, then your /etc/sudoers file is corrupt. You will need to restore this from a backup, most likely from Recovery mode, as it is unlikely you have permissions to become root any longer.
This is mostly making guesses, and trying to answer future questions, so it is very possible my ability to predict the future is not working very well today. Please correct any bad guesses.
Posted on Jun 27, 2016 6:12 AM