0

I'd like to skip sudo passwords, i.e. I don't want to be asked a password when I use sudo command. Is it possible? I know about the security issues, I'll use it only on my virtual test servers.

Edi
  • 3
  • Yes both comments and the answer all answer my question. I have to say that I'm very impressed with such quick answers. Thank you very much all. – Edi Apr 07 '20 at 15:12
  • Do you think I need to delete my question? Because it looks like it is answered already? – Edi Apr 07 '20 at 15:15

1 Answers1

1

Assuming your username is edi, you can apply the following procedure:

Just change all the occurences of edi with your username

#  create /etc/sudoers.d/edi file
sudo nano /etc/sudoers.d/edi
#  put the following line on it
edi ALL=(ALL) NOPASSWD: ALL
#  make the file owned by root
sudo chown root:root /etc/sudoers.d/edi
#  change the permissions of file just to execute
sudo chmod 440 /etc/sudoers.d/edi

You may need to logout and login again.

NK_
  • 317
  • 1
  • 3
  • 11