paint-brush
Configure Your Linux With Passwordless Sudo For A Specific Userby@itsvinayak
415 reads
415 reads

Configure Your Linux With Passwordless Sudo For A Specific User

by vinayakMarch 7th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Linux follows tough rules when it comes to permission. Being a root user or a sudo user gives you permission to do almost anything which normal user don’t have. Several commands need a password to run and each time you try to run a password, Linux asks for a password. Today we will configure a passwordless passwordless version of the current user's current username using the current command. The username is your username for which you want to configure passwordless sudo. The password is not required to be used by Linux users.
featured image - Configure Your Linux With Passwordless Sudo For A Specific User
vinayak HackerNoon profile picture

Linux follows tough rules when it comes to permission. Being a root user or sudo user gives you permission to do almost anything which normal user don’t have. Several commands need sudo keyword to run and each time you try to run sudo, Linux asks for a password, today we will configure a passwordless sudo.

Step 1: We need to edit the sudoers file we can use command.

$ sudo gedit /etc/sudoers

this will open a document

Step 2: Edit “ALL=(ALL) NOPASSWD: ALL” with username below the line includedir /etc/sudoers.d

>> username ALL=(ALL) NOPASSWD:ALL

here, the username is your username for which you want to configure passwordless sudo

Step 3: get the current username , use command

$ echo "$USER"

Step 4: Edit file with username and save it

Step 5: Try using sudo command

$ sudo apt update

and done, now you can use sudo without any password