[mythtv-users] Carbon Footprint

Bill Meek keemllib at gmail.com
Wed Sep 4 15:19:37 UTC 2013


On 09/04/2013 09:33 AM, Daryl McDonald wrote:
...
>
> something else just occurred to me, in an attempt to satisfy the following
> suggestion from the Wiki:  " You should check to make sure the user as whom
> mythbackend runs is able to run sudo without prompting for a password.
> Consult the documentation for sudo on how to set this up in the sudoers
> file, in particular the NOPASSWD tag. For example, you could add the
> following line to your /etc/sudoers by running "sudo visudo" and pasting
> the line at the end of the file." without actually checking the user
> permission (newbie inability showing) I simply stuck the line "%mythtv ALL
> = NOPASSWD: /sbin/shutdown, /usr/bin/setwakeup.sh" at the eend of my
> sudoers.d file. So that it now looks like this:
>
> daryl at daryl-A780L3C:~$ sudo cat /etc/sudoers.d/README
> [sudo] password for daryl:
> #
> # As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
> # installation of the package now includes the directive:
> #
> # #includedir /etc/sudoers.d
> #
> # This will cause sudo to read and parse any files in the /etc/sudoers.d
> # directory that do not end in '~' or contain a '.' character.
> #
> # Note that there must be at least one file in the sudoers.d directory (this
> # one will do), and all files in this directory should be mode 0440.
> #
> # Note also, that because sudoers contents can vary widely, no attempt is
> # made to add this directive to existing sudoers files on upgrade.  Feel
> free
> # to add the above directive to the end of your /etc/sudoers file to enable
> # this functionality for existing installations if you wish!
> #%mythtv ALL = NOPASSWD: /sbin/shutdown, /usr/bin/setwakeup.sh
> daryl at daryl-A780L3C:~$
>
> Should this have been done?
>

Yes, but not that way.

You put the command at the end of the README file, which is useless.
It's also harmless, but I'd remove it just so you don't trip over it
a year from now and wonder why it's there.

To expand on the details from Stefan earlier in this thread and the
Wiki:

   The Wiki puts the command in the /etc/sudoers file, which I disagree with
   for any modern distribution e.g. Mythbuntu 12.04.

   Stefan chose to name the file mythwelcome, I prefer mythtv. It really
   doesn't matter.

First, see if there is a MythTV related file already in place:

     sudo ls -l /etc/sudoers.d

If there is, change mythtv in the next command to match it, and then
use:

     sudo visudo -f /etc/sudoers.d/mythtv

This is not the cause of the backend not detecting idle shutdown. But
you must fix it.

I didn't see the output of:

     ps ax | grep myth | grep -v grep

It should only be a few lines long, so put it in a reply here.

And, no you can't do: pastebinit ps ax | grep myth | grep -v grep
You can do:           ps ax | grep myth | grep -v grep | pastebinit

-- 
Bill


More information about the mythtv-users mailing list