[mythtv-users] ACPI wakeup reset
David Watkins
watkinshome at gmail.com
Tue Jul 17 08:49:24 UTC 2007
On 16/07/07, Michelle Dupuis <support at ocg.ca> wrote:
> Ok...I'm getting closer. My testing was as root, so now I'm testing as
> mythtv user. My mythtv setup has this as the shutdown script:
> sudo sh -c 'echo $time > /proc/acpi/alarm'
>
> However, when I try (logged in as mythtv) to run the above (with a real date
> time)I get:
> bash: /proc/acpi/alarm: Permission denied
>
> So...I checked my /etc/sudoers and I see these two lines (which should allow
> the mythtv user to access acpi/alarm):
> Cmnd_Alias MYTHDORA
> /usr/share/mythdora/dorabackup,/usr/share/mythdora/mythdorasetup.pl,/sbin/se
> rvice,/bin/mount,/bin/chmod,/bin/umount,/sbin/chkconfig,/usr/share/mythdora/
> killbackend.sh,/usr/bin/k9copy,/usr/bin/wlassistant,/proc/acpi/alarm
> ALL ALL=(ALL) NOPASSWD: MYTHDORA
>
> Why would I still get a password prompt when mythtv user is trying to write
> to /proc/acpi/alarm ?
well I'm guessing here, but all the other items in that statement are
executable files, except for /proc/acpi/alarm.
its actuall 'sh', that you're trying to execute as root.
So you could try:
- adding sh to your list of progs, or...
- writing a little script to do the echo, and call that script, or...
- modify your sudoers file to permit sudo on everything, rather than
a specified list of progs (I think that's how my machine is set up).
HTH
More information about the mythtv-users
mailing list