0

For no reason that I can figure, my Raspbian install on my Pi stopped letting me sudo. I've been able to get into a kind of single-user mode using this page, but now that I'm there, I can't figure out what the error is. I've compared it to the sudoers file on my Pi 2, and they look nearly identical. It says there's a syntax error near line 27. Here's what I see in visudo: Imgur

Any help would be appreciated.

2
  • 1
    what is the output of ls -la /etc/sudoers.d Jan 31, 2016 at 2:53
  • Hmm. Seems pretty empty. And the README seems empty. Imgur
    – A. Davis
    Jan 31, 2016 at 18:57

1 Answer 1

0

Thanks to the suggestion of Steve Robillard, I checked the contents of /etc/sudoers.d, where I found only a README, which didn't output anything when I cat'd it. Then I took a look on my other Pi, and found it also had the single README file, but the proper one just contained a commented message about itself. Then I went back to the pi with the problem, and overwrote /etc/sudoers.d/README with # this is a test file, and now everything is working again.

What I suspect happened is that that README somehow got corrupted and that tripped up the system even though there was no problem with /etc/sudoers itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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