Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to do sudo su

I get the following errors.

 sudo: /etc/sudoers is mode 0777, should be 0440
 sudo: no valid sudoers sources found, quitting

I tried following the post , but it is not getting sorted out. My sudo su is not working even after those steps.

Also, I am having problem with ssh localhost command. When I type it, I am getting following errors.

 ~$ ssh localhost
Connection closed by UNKNOWN

I tried somethings like sshd restart and all, but it is not working. Please can anyone help me?

share|improve this question
By "not working even after those steps" you mean it outputs the very same error message? What are the current permissions of /etc/sudoers? Just run an ls -lah /etc/sudoers. You just need to change the permissions of the file. If it gets too compilcated through GRUB, you can always do it through any Live CD that is able to mount the partition (just do it from a root shell). – njsg Mar 28 '12 at 9:12
Hi, yes I am getting the same error message even after doing that requested things in that in Recovery mode. I didn't try that live CD method still. After running the command ls -lah /etc/sudoers, I get the following line. -rwxrwxrwx 1 root root 574 2011-04-15 21:24 /etc/sudoers I don't understand what does that mean, but if you can help me with that, I will be very happy. :) – Prasad Mar 28 '12 at 11:35
the leftmost column has the modes, the second to tenth give the permissions for user, group and other people. rwx means everything is on, so you have 0777, instead of 0440, which means you didn't change the permissions on the file, and that's why it's still complaining the mode is 0777. Because it is. I don't know ubuntu, nor its recovery console, so I can't exactly give you a step-by-step guide. – njsg Mar 28 '12 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.