How To Enable Passwordless Sudo For A Specific User in Linux

Oct 01, 2017 · Updated: Feb 21, 2018 · by Tim Kamanin

This can be done is 3 quick steps:

  1. Edit sudoers file: sudo nano /etc/sudoers
  2. Find a line which contains includedir /etc/sudoers.d
  3. Below that line add: username ALL=(ALL) NOPASSWD: ALL , where username is your passwordless sudo username; Save your changes.

You're done. From now on, your user will be able to execute sudo any_command without providing a sudo password.

Hey, if you've found this useful, please share the post to help other folks find it:

There's even more:

Subscribe for updates

  • via Twitter: @timonweb
  • old school RSS:
  • or evergreen email ↓ ↓ ↓