How to fix your /etc/sudoers permissions
LinuxSo you decided to be brave and mess with your /etc/sudoers file but you end up just breaking it. Or maybe I am the only one who did that.
I was trying to find a way of running the Ubuntu update-manager without having to put my password in. I read that you have to edit the /etc/sudoers file to do that, so no problem, right. First I sudo gedit /etc/sudoers but it tells me that I don't have permissions to do this, no problem, just change the permissions. So I sudo chmod 0640 /etc/sudoers which changes the permissions, what I did realize that sudo does not work unless it has a permission of 0440. So now every time I try and sudo anything I get the message " sudo: /etc/sudoers is mode 0640, should be 0440" so I cannot sudo chmod 0440 /etc/sudoers.
The Fix:
After some more pain and searching for how to fix it, I find that I can just go into recovery mode from the GRUB menu and then chmod 0440 /etc/sudoers and reboot. So once again I avoid a reinstall of Ubuntu





Loading....