Ubuntu – Wrong Permission to /etc folder


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
su: Authentication failure

Best Answer

  • 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