I recently started having this error when using the sudo command:

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

Any idea how to resolve this? I use Ubuntu.


The error tells you that you need to set the file permissions of /etc/sudoers to 0440. Log in as root or escalate yourself to root using su and type chmod 440 /etc/sudoers.

Have no idea how file permissions could have changed though.

  • Need to be careful about what you change.. If you don't have the ability to log in directly as root, you'll need to boot into single-user mode to fix the permissions. – Shane Madden Apr 8 '11 at 21:11
  • True, and actually, by default Ubuntu has no password set on root user, so you probably won't be able to run su or log in as root directly. To boot into single user mode you'll need to select the kernel configuration that you'll boot into when grub starts up at boot time. For a basic instructional as to how to login in single user mode, see the first bit of debuntu.org/recover-root-password-single-user-mode-and-grub – photoionized Apr 8 '11 at 21:16
  • One of the first things todo on a fresh ubuntu is running sudo su and then passwd. Choose long secure password and keep a hardcopy of it along with your hardware documents - just to be safe. – mbx Apr 8 '11 at 21:22
  • Can't do that because the ironic thing is I don't have sudo permissions in order to perform the chmod command :) – Genadinik Apr 8 '11 at 21:23
  • 2
    Which is why you need to be the root user, not an unprivileged user trying to run a privileged command through sudo. If you have a password already set for the root user see my answer regarding su above, or if you don't, see the link in my comment about becoming the root user through booting into single user mode. – photoionized Apr 8 '11 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.