1

I'm running Ubuntu 20.04 LTS on my home server. I have just one user which I want to be able to use sudo, but I can't get it to work. I already ran sudo usermod -aG sudo rlommers. the output of id rlommers also states that I'm in the sudo group. However, when I run sudo apt-get update, I'm still required to enter the password. Why is that?

rlommers@server [~]$ id rlommers
uid=1000(rlommers) gid=1000(rlommers) groups=1000(rlommers),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd),117(docker)
rlommers@server [~]$ sudo apt-get update
[sudo] password for rlommers:

EDIT Sorry! For future reference: I already solved it by adding rlommers ALL=(ALL) NOPASSWD: ALL to the sudo file.

  • It may be helpful to others searching for a solution to this issue if you were to add your solution as an answer to this question, and mark it as accepted. – Ulincsys Apr 26 '20 at 08:19

1 Answers1

0

Adding a user to the sudo group simply allows them to run commands as an elevated user - much the same as doas. As in this great answer for AWS the solution here is:

   $User ALL=(ALL) NOPASSWD:ALL

(Where $User is your User ID)

....and a complementary, be careful with no prompt in an elevated environment!