Saturday, December 19, 2009

sudo: /etc/sudoers is mode 0777, should be 0440

I wanted to edit /etc/sudoers, I try to edit it but it said "You do not have the permissions necessary to open the file."

AND THEN, I did chmod 777 /etc/sudoers, and yes, I know, that was so stupid to do :(

Anyways for those who did the same mistake, need not worry, just follow the steps below.

1) Restart your system in recovery mode
2) Drop into the root shell
3) Execute chmod 0440 /etc/sudoers
4) Reboot the system

That's it to it ..

And yes I am using Ubuntu 9.10 - the Karmic Koala :)


  1. Thanks Abdullah this was great. It worked for me since i had same problem.

  2. it didnt work.
    it responds..
    chmod: changing permissions of `/etc/sudoers': Operation not permitted