Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I change the ownership of the sudoers file from 501 to 0?

Hi-


I've edited the /etc/sudoers file on a clean install of El Cap and now I can't run the SUDO command. Gives me this:


sudo: /etc/sudoers is owned by uid 501, should be 0

sudo: no valid sudoers sources found, quitting

Now it seems by editing the /etc/sudoers file I've changed the ownership from uid 0 to 501. In Yosemite and before I'd just run 'Repair Permissions' in Disk Utility and I'd be styling..... but this is El Cap.

iMac, OS X El Capitan (10.11), null

Posted on Oct 4, 2015 5:52 PM

Reply
Question marked as Best reply

Posted on Oct 4, 2015 5:57 PM

Restart with the Command and S keys held down, and run the following:


mount -uw /

chown /private/etc/sudoers 0

exit


(134430)

5 replies

How can I change the ownership of the sudoers file from 501 to 0?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.