I am running Bullseye with non "pi" account and wanted to require my user to always type in a sudo password. I used sudo visudo -f /etc/sudoers.d/010_pi-nopasswd and changed



myaccount ALL=(ALL) PASSWD: ALL

That worked fine. Now I've decided that I'm sick of typing in my password so I want to change it back to no password. But I changed the line, using visudo, back to myaccount ALL=(ALL) NOPASSWD: ALL and it's still requiring a password. I've logged out/back in and rebooted. No change. I never saw any visudo errors (in fact, I wondered what a visudo error looked like so I intentionally mistyped something in the file and I got the normal syntax error, then typed x to exit without saving. So I know visudo is doing its syntax checker). Any assistance is appreciated. Scott.

1 Answer 1


You didn't explain why you've edited an alternative sudoers file??

All you need is: sudo visudo. That may explain your problem. If you feel you've done the right thing by editing this alternative file, read on:

At the bottom of your sudoers file, you may find a line similar to the following:

@includedir /etc/sudoers.d

That refers to a folder that may contain the following files:

$ ls -l /etc/sudoers.d
total 16
-r--r----- 1 root root  36 Apr 29  2019 010_at-export
-r--r----- 1 root root  27 Oct 18  2016 010_pi-nopasswd
-r--r----- 1 root root 211 Oct 19  2021 010_proxy
-r--r----- 1 root root 958 Feb 27  2021 README

If there are any files in this directory, you should look closely at them. They are all executed by run-parts (ref man run-parts), and they may contain the answer you're seeking. Perhaps:

myaccount ALL=(ALL) PASSWD: ALL

If that doesn't fix your issue, we need more details on exactly how you've arrived at where you are.

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.