Ubuntu Error “sudo: /etc/sudoers is mode 0640, should be 0440″
by Craig Mayhew on Sep.27, 2009, under Guides/Fixes, Linux/Ubuntu
If for whatever reason you change the permissions on your sudoers file you will get a similar error to “sudo: /etc/sudoers is mode 0640, should be 0440″ whenever you try to run the sudo command. The problem is that because the permissions are wrong on the sudoers file, linux won’t let you run the sudo command!
To get around this press “Esc” at the grub loader screen when linux is booting and enter into the latest recovery mode. Then select the option that allows you to drop into a command line as root and type
chmod 0440 /etc/sudoers
Then reboot and your troubles should be solved!
7 Comments for this entry
1 Trackback or Pingback for this entry
-
Ubuntu /etc/sudoers problem
November 21st, 2010 on 8:26 pm[...] any users to the sudo users as my sudoers file has the wrong permission. My only access is SSH thus this(via recovery mode) solution doesn’t seem to work for [...]
November 17th, 2009 on 10:07 am
Thanks!!!
April 6th, 2010 on 10:19 am
Thanks a LOT !!!
I was near to reinstall my ubuntu server and with your help I could avoid it….
August 24th, 2010 on 2:06 pm
thanks a lot
can u describe about the sudoers entries
how can i reduce the 15 minute allowed time for a user in sudoers entry
have a nice day
December 22nd, 2010 on 5:24 pm
I had this problem after messing around with samba. I wasn’t in a position where I could restart my (Ubuntu 10.10) server, so I ignored it.. Now I just found a solution though: drop to the su shell.
Problem:-
$ sudo vim /etc/bash.bashrc
sudo: /etc/sudoers is mode 0640, should be 0440
sudo: no valid sudoers sources found, quitting
Solution:-
$ su -
Password:
root@metabuntu:~# chmod 0440 /etc/sudoers
root@metabuntu:~# logout
$ sudo vim /etc/bash.bashrc ## Now works!!!
July 24th, 2011 on 4:42 pm
After I issued command chmod -R 777 /etc
all the services are down like networking services, mysql services. when i type sudo command it shows
sudo: /etc/sudoers is mode 0640, should be 0440
sudo: no valid sudoers sources found, quitting
when i type su root
password:
authentication failure.
can anyone plz tell me the solution for the above prob
September 12th, 2011 on 9:13 pm
Perfect, thank you!
September 16th, 2011 on 6:44 pm
For those of you that “ESC” key doesn’t work, try holding down the left shift key.