NOPASSWD option not working in sudo

user1800997

I am trying to add NOPASSWD option for existing user who belongs to the sudo group and have admin rights. I added this line in sudoers file:

max     ALL=(ALL:ALL) NOPASSWD: ALL

But it still ask me for password when i try to execute command with sudo.

heemayl

The sudoers file is parsed line by line and the last rule prevails for a given user.

So, you need to add this rule after all other rules applicable for the given user to have this in effect.

For example, if the user max belongs to sudo group, then the following won't have desired result:

max     ALL=(ALL:ALL) NOPASSWD: ALL
%sudo   ALL=(ALL:ALL) ALL

Reverse the order to get max passwordless sudo access:

%sudo   ALL=(ALL:ALL) ALL
max     ALL=(ALL:ALL) NOPASSWD: ALL

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Sudo NOPASSWD not registering/working/showing

From Dev

Why is sudoers NOPASSWD option not working?

From Dev

Sudo with NOPASSWD and service restart

From Dev

sudo NOPASSWD for particular paths

From Dev

nopasswd in sudoers not working

From Dev

NOPASSWD option not applying to second command

From Dev

uTorrent server only working with 'sudo -i' option

From Dev

Execute a sudo NOPASSWD command remotely via SSH

From Dev

Sudo validate (sudo -v) asks for password even with NOPASSWD

From Dev

sudoers NOPASSWD: sudo: no tty present and no askpass program specified

From Dev

Jenkins sudo: no tty present and no askpass program specified with NOPASSWD

From Dev

Allow all commands via sudo but nopasswd for specific commands

From Dev

What are the actual risks of giving www-data sudo nopasswd access?

From Dev

Why is sudoers NOPASSWD option applying the exception to ROOT instead of specified user?

From Dev

Why am I being prompted for a sudo password when I specified "NOPASSWD" in my /etc/sudoers file?

From Dev

sudo E option does not work?

From Dev

How to use sudo -u option?

From Dev

fastboot and adb not working with sudo

From Dev

GUI sudo not working?

From Dev

sudo stopped working

From Dev

Sudo not working on CentOS 7

From Dev

Why doesn't root need the password to run "sudo" even when "NOPASSWD:ALL" isn't written in /etc/sudoers

From Dev

jQgrid Search option is not working

From Dev

The option `lty` in `plot()` not working

From Dev

enum option "new" not working

From Dev

Working with option and list in OCaml

From Dev

Permanent Delete Option Not working

From Dev

Delete option not working in Magento

From Dev

Fullcalendar constraint option not working

Related Related

HotTag

Archive