This question already has an answer here:

sudo from a standard user works fine, but when I try to use it from root it returns this error:

sudo: can't open /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting

/etc/sudoers has the appropriate 755 attribute and owned by root:root I even recreated it with visudo, all fine, but error persists. /etc is 755 and also owned by root:root, I even tried to reinstall sudo: no difference.

I need to sudo from root because I use a python script which uses sudo to run os privileged commands. But now I'm running that python script at boot time and it crashes due to this issue. I installed the same version of the OS in a Virtual Box VM and it works fine.

What can be keeping root from running sudo?

marked as duplicate by αғsнιη, Eric Carvalho, mikewhatever, Panther, waltinator Apr 6 '15 at 22:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @KasiyA, actually it's not a duplicate, because the solution to my problem was found on a totally different perspective and suggesting it's a duplicate can mislead users with the same issue as my installation had. – user263657 Apr 2 '15 at 12:53
  • You should have updated your question to indicate you had changed ownership and/or permissions of system files and or updated the question as to why you feel it is not a duplicate (rather then leaving a comment). Without that information your question is incomplete and misleading, thus marked as a duplicate. I am voting to close as unclear what you are asking for these reasons. – Panther Apr 6 '15 at 13:14

Can you change directory to / ? being in root user? May be you are missing permission to this path / as root

See https://unix.stackexchange.com/questions/39328/sudo-cannot-open-etc-sudoers


  • Thanks, @Aravinda, yes I seem to be able to do much everything while logged as root, except executing the sudo command. – user263657 Apr 2 '15 at 11:41
  • Hold on! My / folder is not owned by root! I'm gonna change that now and see if that fix the issue (thanks for your added links, @Aravinda) – user263657 Apr 2 '15 at 11:49
  • 1
    Do not change ownership or permissions of system files, you will break Ubuntu. – Panther Apr 6 '15 at 13:13

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