Not sure if this is the place for troubleshooting, but I am gonna give it a shot.
I was trying to make my computer turn off without needing sudo, and I must have done something wrong because I get a syntax error when trying to use sudo. I added an empty file in /etc/sudoers.d and added the following line:
user ALL=NOPASSWD: /sbin/reboot, /sbin/poweroff
I have done some web browsing and I think I have ruled out some possible solutions.
Cannot boot into Live CD because I can't mount a USB without sudo access.
Do not have a Super User.
I do not have pkexec installed either.
From what I have researched, I think I need to enter 'recovery mode' or somthing along those lines. I am now wondering if anyone could write a quick step-by-step guide on the process of that, since I have not found a good guide online. Or perhaps their is another solution that I have missed.
Thanks is advanced!
EDIT: Exact error referring to the file I added a line in.
>>> /etc/sudoers.d/config: syntax error near line 1 <<<
sudo: parse error in /etc/sudoers.d/config near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudobroken. – mikewhatever May 02 '20 at 23:53sudoto turn the computer off or reboot. Only remote users running SSH usually needsudofor those steps. AlsoNOPASSWDdoesn't mean that you don't need to still type insudo. The only user that doesn't need to type insudois the root user. – Terrance May 03 '20 at 00:01