sudo + nopasswd

Archived topics about LMDE 1 and LMDE 2
Locked
inp3dance
Level 1
Level 1
Posts: 18
Joined: Thu Apr 28, 2011 4:10 pm

sudo + nopasswd

Post by inp3dance »

Hi,

In all the distros I used I set up the following line in /etc/sudoers :
user ALL=(ALL) NOPASSWD: ALL

Now in LMDE I tried this and the following combinations too :

user ALL=(ALL:ALL) NOPASSWD: ALL
user ALL=NOPASSWD: ALL
(Obviously user here replaces my user name.)

But sudo still keeps asking me for the password. What is different in LMDE in this regard? How can I set up a passwordless sudo? ( Here I mean passwordless for my user only ).
Thank you!
User avatar
DrHu
Level 17
Level 17
Posts: 7521
Joined: Wed Jun 17, 2009 8:20 pm

Re: sudo + nopasswd

Post by DrHu »

No idea, but if a command is not being accepted, I remember to include spaces to separate parts..

Space out the commands, both to make it more readable and to make sure separate commands get separation..
https://help.ubuntu.com/community/Sudoers

http://www.ducea.com/2006/06/18/linux-t ... -nopasswd/
  • NOPASSWD
    If you don’t want to be prompted for any password while running sudo then we can use the NOPASSWD parameter on a particular entry:
    admin ALL = NOPASSWD: ALL
    this parameter is the opposite of the default PASSWD and will no longer require any password for the user “admin” while running sudo
glenn4uk
Level 1
Level 1
Posts: 8
Joined: Tue May 03, 2011 4:01 pm

Re: sudo + nopasswd

Post by glenn4uk »

Try placing the user ALL=NOPASSWD: ALL entry at the end of the /etc/sudoers file. Your user name is probably in a group entry {%sudo) which is taking precedence if it is being read last in sudoers.
joelteixeira
Level 1
Level 1
Posts: 2
Joined: Sat Dec 03, 2011 10:25 am

Re: sudo + nopasswd

Post by joelteixeira »

Thanks glenn4uk,

Your solution fixed mine sudoers.
tux_fan
Level 1
Level 1
Posts: 4
Joined: Tue Feb 12, 2013 12:13 am

Re: sudo + nopasswd

Post by tux_fan »

joelteixeira wrote:Thanks glenn4uk,

Your solution fixed mine sudoers.
This still works.

% sudo tail -1 /etc/sudoers
my_user ALL = NOPASSWD: ALL
Locked

Return to “LMDE Archive”