Sudo NOPASSWD not working

Here is a quick reminder for sudo and non-working NOPASSWD statements.

 When multiple entries match for a user, they are applied in order.
 Where there are multiple matches, the last match is used (which is
 not necessarily the most specific match).

This means that more specific entries like this should be put towards the end of the file:

username ALL = NOPASSWD: /usr/bin/dbus-send
username ALL = NOPASSWD: /usr/sbin/pm-suspend
username ALL = NOPASSWD: /usr/sbin/pm-hibernate


This entry was posted in Linux and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *