Mac OSX no valid sudoers sources found

previousdeveloper picture previousdeveloper · Oct 8, 2015 · Viewed 10.2k times · Source

I am always getting this error. What is the solution ?

enter image description here

Answer

user3277192 picture user3277192 · Oct 8, 2015

As the error message says: your /etc/sudoers file has the wrong permissions.

the normal permissions (on OS X 10.10) are:

$ ls -l /etc/sudoers -r--r----- 1 root wheel 1293 Sep 19 2012 /etc/sudoers

so get a root shell in some other manner and issue chmod 660 /etc/sudoers and/or the appropriate chgrp and chown commands.

To get a root shell, it all depends on what you have left as assets. The failsafe method would be from a recovery partition, but booting in single user mode should be enough in most cases.

Single user mode: boot holding "Command-S" ref: https://support.apple.com/en-us/HT201573