sudoers.d - trying to run a script without a password for xfce4-genmon-plugin
I wanted to read the battery power draw in watts
I have read numerous webpages and settled on adding the script to sudoers.
So I created a file, "panel", in /etc/sudoers.d which reads
Cmnd_Alias PANEL = /usr/local/bin/panel.sh
ALL ALL = (ALL) NOPASSWD:PANEL
Defaults!PANEL !requiretty
I have tried a few variations of the above, this is the current one.
The script has a few lines like
AMPS=$(cat /sys/class/power_supply/BAT0/current_now)
Before I had sudo cat, and it worked, but only if I entered my password. Obviously I need to get rid of the password requirement for genmon.
So I just removed the sudo command from the script but now it just returns 0.
I've obviously stepped into a hole somewhere but I can't find the answer.
Anyone got any ideas????
Never mind I'm an idiot. It works I just had the power plugged in. How do I delete this?
Last edited by whutwhutinthebutt; 03-09-2016 at 11:40 AM.
Reason: I'm an idiot.
|