<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 11:19 AM, Bill Meek <span dir="ltr">&lt;<a href="mailto:keemllib@gmail.com" target="_blank">keemllib@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 09/04/2013 09:33 AM, Daryl McDonald wrote:<br>

...<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br><div><div class="h5">
something else just occurred to me, in an attempt to satisfy the following<br>
suggestion from the Wiki:  &quot; You should check to make sure the user as whom<br>
mythbackend runs is able to run sudo without prompting for a password.<br>
Consult the documentation for sudo on how to set this up in the sudoers<br>
file, in particular the NOPASSWD tag. For example, you could add the<br>
following line to your /etc/sudoers by running &quot;sudo visudo&quot; and pasting<br>
the line at the end of the file.&quot; without actually checking the user<br>
permission (newbie inability showing) I simply stuck the line &quot;%mythtv ALL<br>
= NOPASSWD: /sbin/shutdown, /usr/bin/setwakeup.sh&quot; at the eend of my<br>
sudoers.d file. So that it now looks like this:<br>
<br>
daryl@daryl-A780L3C:~$ sudo cat /etc/sudoers.d/README<br>
[sudo] password for daryl:<br>
#<br>
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on<br>
# installation of the package now includes the directive:<br>
#<br>
# #includedir /etc/sudoers.d<br>
#<br>
# This will cause sudo to read and parse any files in the /etc/sudoers.d<br>
# directory that do not end in &#39;~&#39; or contain a &#39;.&#39; character.<br>
#<br>
# Note that there must be at least one file in the sudoers.d directory (this<br>
# one will do), and all files in this directory should be mode 0440.<br>
#<br>
# Note also, that because sudoers contents can vary widely, no attempt is<br>
# made to add this directive to existing sudoers files on upgrade.  Feel<br>
free<br>
# to add the above directive to the end of your /etc/sudoers file to enable<br>
# this functionality for existing installations if you wish!<br>
#%mythtv ALL = NOPASSWD: /sbin/shutdown, /usr/bin/setwakeup.sh<br>
daryl@daryl-A780L3C:~$<br>
<br>
Should this have been done?<br>
<br>
</div></div></blockquote>
<br>
Yes, but not that way.<br>
<br>
You put the command at the end of the README file, which is useless.<br>
It&#39;s also harmless, but I&#39;d remove it just so you don&#39;t trip over it<br>
a year from now and wonder why it&#39;s there.<br>
<br>
To expand on the details from Stefan earlier in this thread and the<br>
Wiki:<br>
<br>
  The Wiki puts the command in the /etc/sudoers file, which I disagree with<br>
  for any modern distribution e.g. Mythbuntu 12.04.<br>
<br>
  Stefan chose to name the file mythwelcome, I prefer mythtv. It really<br>
  doesn&#39;t matter.<br>
<br>
First, see if there is a MythTV related file already in place:<br>
<br>
    sudo ls -l /etc/sudoers.d<br>
<br>
If there is, change mythtv in the next command to match it, and then<br>
use:<br>
<br>
    sudo visudo -f /etc/sudoers.d/mythtv<br>
<br>
This is not the cause of the backend not detecting idle shutdown. But<br>
you must fix it.<br>
<br>
I didn&#39;t see the output of:<div class="im"><br>
<br>
    ps ax | grep myth | grep -v grep<br>
<br></div>
It should only be a few lines long, so put it in a reply here.<br>
<br>
And, no you can&#39;t do: pastebinit ps ax | grep myth | grep -v grep<br>
You can do:           ps ax | grep myth | grep -v grep | pastebinit<div class=""><div class="h5"><br>
<br>
-- <br>
Bill<br>
______________________________<u></u>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/<u></u>listinfo/mythtv-users</a></div></div></blockquote><div><br></div><div>There is only the README file in there:</div>
<div><div>daryl@daryl-A780L3C:~$ sudo ls -l /etc/sudoers.d</div><div>[sudo] password for daryl: </div><div>total 8</div><div>-r--r----- 1 root root 814 Aug 31 11:30 README</div><div>-r--r----- 1 root root 753 Jan 31  2012 README~</div>
<div>daryl@daryl-A780L3C:~$ </div></div><div><br></div><div>So I&#39;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?</div>
<div> </div></div>Here is the report for the other command:</div><div class="gmail_extra"><div class="gmail_extra">daryl@daryl-A780L3C:~$  ps ax | grep myth | grep -v grep</div><div class="gmail_extra"> 1900 ?        Ssl    0:34 /usr/bin/mythbackend --syslog local7 --user mythtv</div>
<div class="gmail_extra">daryl@daryl-A780L3C:~$ </div><div><br></div><div>Thanks Daryl</div></div></div>