Score:0

I have succeeded in messing up /etc/sudoers and /etc/sudoers.d/sudoers. I can no longer access either of these files

cn flag

entering sudo in a terminal session, I get the following response:

>>> /etc/sudoers.d/sudoers: too many levels of includes near line 30 <<<
sudo: parse error in /etc/sudoers.d/sudoers near line 30
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

When I first installed Ubuntu 20.04, I also removed the login requirement for entering a password on boot, having used other systems which did not have this requirement.

How can I recover from my errors and lack of understanding without re-installing Ubuntu 20.04?

pLumo avatar
in flag
Won't help you now, but this is exactly why you should never edit `sudoers` file directly, but always use `visudo`. I guess you can edit your `sudoers` using `pkexec visudo`.
pLumo avatar
in flag
Does this answer your question? [How to modify an invalid '/etc/sudoers' file?](https://askubuntu.com/questions/73864/how-to-modify-an-invalid-etc-sudoers-file)
Score:1
cn flag

Remove the /etc/sudoers.d/sudoers file.

Your sudoers file is /etc/sudoers. This is configured to source files in /etc/sudoers.d/. The file giving problems for you is /etc/sudoers.d/sudoers, which is normally not there. So I expect you will resolve the issue deleting that file.

thombrown avatar
cn flag
I did finally succeed in removing /etc/sudoers.d/sudoers, and that seems to have fixed the problem. I believe my system is now operating in a normal fashion. Thank you!!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.