Instead of a password-less setup I recommend simply putting your userid into the sudo group. You will have to enter a password once and a while, but it is more secure because it doesn't leave you as vulnerable to malicious scripts that use sudo to get root access. When you enter your password you won't have to enter it again for a certain amount of time.
You should add your userid to the sudo group.This is the command you would use if you wanted to do this, replacing "bill" with your own userid:
Code: Select all
usermod --groups sudo --append bill
DISCLAIMER: Following this procedure leaves you vulnerable to attacks from scripts that use sudo to get root access.
To setup sudo so that you don't need to enter a password, follow these steps:
Steps
- Become root by entering the "su" command followed by the root password, when prompted.
- Used your editor to create a file in the /etc/sudoers.d directory. You can name the file whatever you want. I named it sudoers-custom. For example:
Code: Select all
vi /etc/sudoers.d/sudoers-custom
- Add the following line to the file, replacing "bill" with your userid because "bill" is my userid:
Code: Select all
bill ALL=(ALL:ALL) NOPASSWD: ALL