When I use the sudo command I get an error message.

sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

If I try to use chmod on sudoers I get the message "Operation not permitted". Can someone help me fix things so sudo works again?


You should be able to get round this by rebooting into single user mode...

  1. Reboot the computer holding CommandS
  2. The command line should come up showing something about how to mount the drive in write mode mount -uw /, follow these steps.
  3. Now you should be a root user able to edit the /etc/sudoers file.
  4. Issue reboot now to exit and reboot into normal mode.

I don't have a second Mac to test these instructions are step-by-step complete and obviously can't write on the machine while it's rebooting, so please let me know if you get stuck on any steps.

  • Just tested this, it should work, you might get asked to authenticate if you have FileVault enabled. – unknowndomain Aug 12 '18 at 22:55
  • 1
    Yep it worked. I didn't see anything about mounting my drive but the command you gave me, mount -uw / appearantly worked fine. Thank you. – Natsfan Aug 12 '18 at 23:34

Go back to etresoft's suggestion of using Get Info

1> Finder -> Go -> Go to Folder: /etc

2> Select sudoers

3> Finder -> File -> Get Info

4> In the Sharing & Permissions secion, click & unlock the Padlock Set the permissions to:

system - Read only

wheel - Read only

everyone - No Access

  • Who is etresoft ? There is no context to the name. – fd0 Aug 23 '18 at 12:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .