I added powertop to /etc/sudoers (sudo visudo) but it doesn't work. I checked all possible problems I can imagine. What did I missed?
user@ellie:~$ whoami
user
user@ellie:~$ groups
user adm cdrom sudo dip plugdev lpadmin sambashare
user@ellie:~$ ll /etc/sudoers
-r--r----- 1 root root 1093 Feb 6 19:05 /etc/sudoers
user@ellie:~$ sudo powertop
[sudo] Passwort für user:
user@ellie:~$ sudo cat /etc/sudoers | grep powertop
[sudo] Passwort für user:
ALL ALL=(ALL:ALL) NOPASSWD: /usr/sbin/powertop
user@ellie:~$ which powertop
/usr/sbin/powertop
user@ellie:~$ BB
I am in group sudo, permissions seem to be ok, path to powertop checked. But you see, if I type in "sudo powertop" it ask for a password ?!? (In my first attempt the first "ALL" was just "user")
I found out that I have to create a new file:
Putting my lines there helps. As a reason was stated the order of lines, last rule wins.
I accept this, but frankly speaking don't understand. In my sudoers is
As you can see includdir is even commented out and I don't know what this lines interfere with my add on. So, if someone can explain that - I would like to understand this.