How To Enable Passwordless Sudo For A Specific User in Linux
Oct 01, 2017 · Updated: Jun 24, 2026 · by Tim Kamanin
This can be done in 3 quick steps:
- Open the sudoers file:
sudo nano /etc/sudoers - Find the line that contains includedir /etc/sudoers.d
- Below that line, add username ALL=(ALL) NOPASSWD: ALL, where
usernameis the user you want to grant passwordless sudo to. Save your changes.
You're done. From now on, that user can run sudo any_command without entering a sudo password.
Hey, if you've found this useful, please share the post to help other folks find it: