[mythtv-users] Carbon Footprint

Daryl McDonald darylangela at gmail.com
Wed Sep 4 16:12:22 UTC 2013


On Wed, Sep 4, 2013 at 11:19 AM, Bill Meek <keemllib at gmail.com> wrote:

> 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
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>
>

There is only the README file in there:
daryl at daryl-A780L3C:~$ sudo ls -l /etc/sudoers.d
[sudo] password for daryl:
total 8
-r--r----- 1 root root 814 Aug 31 11:30 README
-r--r----- 1 root root 753 Jan 31  2012 README~
daryl at daryl-A780L3C:~$

So I'm guessing I need to make a file in the sudoers.d directory and edit
in that line (without the hash tag,Thank-you Yann) there is already a
mythtv directory in the filesystem, so I should choose a unique name?

Here is the report for the other command:
daryl at daryl-A780L3C:~$  ps ax | grep myth | grep -v grep
 1900 ?        Ssl    0:34 /usr/bin/mythbackend --syslog local7 --user
mythtv
daryl at daryl-A780L3C:~$

Thanks Daryl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130904/e3cfa424/attachment.html>


More information about the mythtv-users mailing list