Why might sudo chmod -R a+w *
cause
sudo: /etc/sudoers is mode 0640, should be 0440 sudo:
no valid sudoers sources found, quitting
and how might it be made to work?
Why might sudo chmod -R a+w *
cause
sudo: /etc/sudoers is mode 0640, should be 0440 sudo:
no valid sudoers sources found, quitting
and how might it be made to work?
I think your best bet is to start the system in recovery mode (see here for instructions), drop to root shell and do chmod 0440 /etc/sudoers
.
EDIT: as Mik suggested below, the following should work as well without rebooting the system:
pkexec chmod 0440 /etc/sudoers
pkexec chmod 0440 /etc/sudoers
without going into recovery mode.
pkexec chmod 0440 /etc/sudoers.d/README
. I wonder if I broke anything else in /etc. Meh.
Why might the command cuase this to happen? I suspect you ran the command while your current directory was /etc
!
sudo
refuses to work if the permissions of /etc/sudoers
have been tamprered with to avoid compromising the system. You will have to fix the permissions using recovery mode unless you have another way of getting root access.