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

Today one of my team mate accidently gave chmod -R 777 on all folders. So he was not able to do sudo su and login as a root user.

Now as a normal user it wont allow you to change the rights. This is a big headache. Ultimately I found the solution to this issue. Restart ur pc and press shift key which will give u an option to start your system in recovery mode.

Select that and you will get an option to login as root with command prompt. Now change the rights of /etc/sudoers to 0440 by using the command chmod 0440 /etc/sudoers. Exit and restart your system.

Now start your terminal and try sudo su to login as a root user. Ah! finally the problem got solved.

If you are still not able to solve this issue. Just write back to me and I shall help you out.

Njoi

Be Sociable, Share!

2 comments

Leave a Reply

Your email address will not be published. Required fields are marked *