<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 11/17/2009 09:02 AM, Robin Hill wrote:
<blockquote
 cite="mid:20091117140217.GC21280@cthulhu.home.robinhill.me.uk"
 type="cite">
  <pre wrap="">On Tue Nov 17, 2009 at 08:47:05AM -0500, Harry Devine wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">On 11/17/2009 08:24 AM, Robin Hill wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">What users are you running things under? The cron.daily scripts will
run as root, so you may need to add an 'su' to the script to force it to
run under the correct user account.

HTH,
     Robin
   
      </pre>
    </blockquote>
    <pre wrap="">Well, I can run it from the command line as my normal user.  I'm using 
Ubuntu 9.10, and I know that the cron.daily stuff is running as root.  
Shouldn't that mean root can run the script fine?  If I add an su in it 
to my normal account, how do I do it so I'm not prompted for the 
password?  That defeats the purpose of if running in the background if I 
have to be there to enter the password every day.

    </pre>
  </blockquote>
  <pre wrap="">The root user has a different home directory, so won't have the same
.mythtv directory.  You could add symlinks, but it's better to keep
things running under the user account.

su shouldn't prompt for a password when run by root - just do:
    su - mythuser -c "mythconverg_backup......"

The other option is to add it to cron.d instead - the format used for
crontab entries here allows for running under different accounts.

Cheers,
    Robin
  </pre>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a>
  </pre>
</blockquote>
OK, I just SSH'd into my box at home and made the changes and ran it
manually and it worked.&nbsp; The script now reads: "su -
&lt;normal_user&gt; -c "mythconverg_backup.pl --rotate 7" ".&nbsp; I guess
I'll see tomorrow AM how well it works.&nbsp; :-)<br>
<br>
Thanks for the tip!<br>
Harry<br>
<br>
</body>
</html>