Whenever I try any
sudo command whatsoever in terminal, I get the following error message:
sudo: /etc/sudoers is owned by uid 503, should be 0 sudo: no valid sudoers sources found, quitting
I have tried logging into single user mode and typing in the following commands:
mount -uw chown /private/etc/sudoers 0
After typing in the chown ownership line, I get an error message saying “illegal username”.
Other things I have tried:
- Reinstalling the OS X (El Capitan)
- Disabling System Integrity Protection (SIP).
- Calling Apple Care who say that
sudocommands have been disabled in El Capitan.
- Logging in under Single User mode and typing in the following code:
chown root:wheel /private/etc/sudoersThis produced the error message “Operation Not Permitted” in my Standard, Admin, and Root accounts. The error message “Read-Only File System” came up when I logged in in Single User Mode.
When I run
ls -la /private/etc/sudoers in Terminal, I get the following:
-rw-r-----@ 1 MY-ADMIN-USERNAME staff 67 18 Feb 14:03 /private/etc/sudoers
Note I’ve replaced my actual admin username with “MY-ADMIN-USERNAME” just so you know what’s showing.
sudo commands to work for a range of reasons, one of which is to get CrashPlan to work.
My hardware is a 2010 iMac, 3.2GHZ, 16GB Ram and 500GB SSD which was installed about a year ago.
These problems have only come up with El Capitan. I didn’t have them in the past with Yosemite.
Looking around online, I can see the many people have had similar issues but the resolutions unfortunately have not worked for me.