OS X 10.8.5
I first realized the problem trying to delete software from a Japanese wireless carrier when I installed their client while I was there.
Then I realized I actually can run no command whatsoever that invokes sudo (or sudo su -).
The specific error message from each attempt at sudo is:
Sorry, user ___me___ is not allowed to execute ____command____ as root on ___machine____
I have confirmed I am an admin (no wheel group membership if that matters, I don't think it should).
I cannot touch or even get a read on suoders either, since the commands require sudo to do so.
I've tried repairing disk permission in Disk Utility
My "/" permissions seemed off, so I tried a solution from googling where I boot in Single User Mode and enter:
> /sbin/fsck -fy > /sbin/mount -wu / > /bin/chmod 1775 / > /bin/sync > exit
The permissions look right after that, but still same problem.
I even tried enabling root for my user via "Enable Root" from Directory Utility.
What could possibly be going on? I only noticed the problem recently but it could have existed for months before.
@Spiff's solution worked. Here is what the sudoers file had:
#User privilege specification root ALL=(ALL) NOPASSWD: /sbin/ifconfig %admin ALL=(ALL) NOPASSWD: /sbin/ifconfig
The entry should have been (and now is):
#User privilege specification root ALL=(ALL) ALL %admin ALL=(ALL) ALL
I know for a fact I never edited this file on this machine. Anyone have any idea how this could happen? My machine also lately exhibits the weird behavior of sometimes having cURL or Ping timeout indefinitely, while I am able to connect to the Internet via browser at the same time, and I have to restart my machine to get them to work. Paranoid me wonders if it's related to my travels in Asia (the Chinese Internet/ hassles of dealing with VPN? Japanese wireless clients?), as I only noticed the problems after I got back from the trip.