I have run this command by mistake chmod -R 777 ./*

Now not able to use sudo and can't open folders as root.

sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
  • Where did you run the chmod command from? Were you running this as superuser? Did you run this from /? We need more information. THe command as written wouldn't affect the sudoers stuff. – Thomas Ward Jan 10 at 18:53
  • Try simply entering "chmod 440 /etc/sudoers" on the command line. That should restore your sudo command. – Bernard Wei Jan 10 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.