Configure Your Linux With Passwordless Sudo For A Specific User

Written by itsvinayak | Published 2020/03/07
Tech Story Tags: linux | passwords | command-line | sudo | bash | cli | latest-tech-stories | password-security

TLDR 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.via the TL;DR App

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

Written by itsvinayak | Computer Science and Engineering student
Published by HackerNoon on 2020/03/07