[mythtv-users] sudo nice --5 xine Permissions?

victor rajewski askvictor at gmail.com
Tue Aug 21 07:09:38 UTC 2007


> So I want to try increasing its run time priority.  I have a script,
> dvd.sh, that  kicks off xine in the DVD Player field of Myth.  The OS is
> punting because of the "sudo nice --5."  How do I tell the OS that
> anyone can run dvd.sh and they don't need to be root to do this.

Why not add the mythtv user to the sudoers file with the ability to
run nice (or if you're paranoid about security, nice --5 xine or
whatever your complete executable is)?

for example, add this line to /etc/sudoers (use visudo to edit
/etc/sudoers for security):
mythtv ALL = NOPASSWD: /usr/bin/nice
or
mythtv ALL = NOPASSWD: /usr/bin/nice --5 xine -blah -blah -blah
or
mythtv ALL = NOPASSWD: /usr/local/bin/my_script.sh

(replace mythtv with any other username, or %group for a group, or ALL
for everyone)

man sudoers for more info. This is a 'nicer' and more secure solution
than using setuid.

vik


More information about the mythtv-users mailing list