Skip to content
Related Articles

Related Articles

Configure Passwordless Sudo For A Specific User in Linux

View Discussion
Improve Article
Save Article
Like Article
  • Difficulty Level : Expert
  • Last Updated : 17 Sep, 2019

Linux has a tough permission rule. Being a root user you are permitted to do anything however the normal user has only some allowed permissions. To run many other commands, they required to ask permissions from the superuser, using keyword sudo after which they need to enter the password.

This requirement of the password after sudo command can be removed using the following steps:

Step 1: Edit sudoers file using the following command

sudo gedit /etc/sudoers

Enter the password, it will open text-editor with sudoers file as follows:

Step 2: Find a line which contains includedir /etc/sudoers.d, press Ctrl + F and paste includedir /etc/sudoers.d

Step 3: Below the line includedir /etc/sudoers.d add the following


where username is your username.

Save your changes Ctrl + S and exit. From now, you will be able to execute sudo any_command without providing a sudo password.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!