0

This question already has an answer here:

I given wrong permission to the /etc folder wrongly

chmod -R 777 /etc

While i want to login as root it gives me error and gives the following output.

How can i give the correct permission and fix this ?

system13@motpl:~$ sudo su
sudo: /etc/sudoers is mode 0777, should be 0440
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
system13@motpl:~$ su root
Password: 
su: Authentication failure
system13@motpl:~$ 

marked as duplicate by Danatela, Avinash Raj, Warren Hill, user.dz, Eric Carvalho May 15 '14 at 16:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • /etc is only writeable by root as default. Did you chmod initially as root? Can you just revert? – Sparhawk May 15 '14 at 6:32
  • I gave full permission (777) to /etc folder as a root. Now i can't login as a root as said in the question. – Sulthan Allaudeen May 15 '14 at 6:35
  • Ah okay, I understand the problem now. – Sparhawk May 15 '14 at 6:46
  • 1
    Actually, hopefully it's clear, but use the answers for the /etc directory instead of just /etc/sudoers. Also, @SulthanAllaudeen, for future reference, sudo chmod is preferred, but if you really want to log in as root, use sudo -i. – Sparhawk May 15 '14 at 7:05
0

The Problem was fixed :

I typed pkexec chmod 0440 /etc/sudoers

And then the permission was changed and then i gave the default permission /etc as chmod 744 /etc

Not the answer you're looking for? Browse other questions tagged or ask your own question.