LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2016, 11:35 AM   #1
whutwhutinthebutt
LQ Newbie
 
Registered: Mar 2016
Posts: 1

Rep: Reputation: Disabled
Cool 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.
 
Old 03-11-2016, 12:45 PM   #2
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,620
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by whutwhutinthebutt View Post
How do I delete this?
Mark the topic as solved. There appears to be no way to have the post removed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure sudoers in CentOS 5.10 for a user to run a script owned by another user as that user ripelivejam Linux - Newbie 2 12-22-2015 02:02 PM
How to edit /etc/sudoers so that I can run another users script vanish78 Linux - Newbie 6 05-15-2011 02:28 PM
Run a script without password ! shipon_97 AIX 1 12-29-2009 06:53 AM
translate a xfce4 plugin mjalalynia Linux - Desktop 2 09-21-2008 02:23 AM
Xfce4 .. Taskbar plugin DavidTempler Linux - General 2 08-20-2004 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration