I tried to use visudo to edit the sudoers setting, and I added a line for my account below the root, here is how I do it

username ALL=(ALL) NOPASSWD:/usr/bin/apt-get update,/usr/bin/apt-get dist-upgrade,/usr/bin/apt-get autoclean

But it just doesn't work!

1 Answer 1


I found that I have to put this line at the end..... I haven't had this problem when I was using openSUSE..

  • Or you could have just added the user to sudo group by executing sudo usermod -aG sudo <username>.
    – Hasan
    Dec 27, 2018 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.