This can be done is 3 quick steps:

  • Edit sudoers file:
    sudo nano /etc/sudoers
  • Find a line which contains includedir /etc/sudoers.d
  • Below that line add: username ALL=(ALL) NOPASSWD: ALL, where username is your passwordless sudo username; Save your changes.
How To Enable Passwordless Sudo For A Specific User in Linux

sudoers file

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

About the author

Hassan Latif

A Microsoft Certified Trainer, a hobby blogger and geek

Leave a Comment