3

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?

αғsнιη
  • 36,350

1 Answers1

3

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

http://arstechnica.com/civis//viewtopic.php?t=1170439

Aravinda
  • 992