Could you not run the cron script from your personal cron job? That way it
wouldn't be running as root, and you'd get the crypt_key and everything else
properly.

An alternative would be to 'exec su -l jdoe -c "exec ..."' from the root
crontab. This would simulate a full jdoe login too.

--
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net

We are actively looking for companies that do a lot of long
distance faxing and want to cut their long distance bill by
up to 50%.  Contact [EMAIL PROTECTED] for more info.


----- Original Message -----
From: "Darley Ware" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 02, 2003 9:38 PM
Subject: Change in tmda-address since 0.65 release?


> >From an idea posted on the list several months ago I have been using
dated
> addresses on my website for people to contact my wife and me.  I recently
> noticed that the script has stopped working.  The script is called from
cron
> and run as root.
>
> ----------
> #!/bin/sh
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
>
> echo -n \<a href=\"mailto:
> /usr/local/tmda/bin/tmda-address -n -c /home/dom/tmda/charlotte/.tmdarc -a
> [EMAIL PROTECTED] -d 23h
> echo \"\>John Doe\</a\>
> ------------
>
> ----
> crontab entry
>
> 16 */1 * * * /home/www/conf/email-jdoe.sh >
> /home/www/thewares/email-jdoe.html
> ----
>
> So basically root is running this command:
>
> /usr/local/tmda/bin/tmda-address -n -c /home/dom/tmda/jdoe/.tmdarc -a
> [EMAIL PROTECTED] -d 23h
>
> When I run this command manually as root I get the following error...
>
>
> Traceback (most recent call last):
>   File "/usr/local/tmda/bin/tmda-address", line 104, in ?
>     from TMDA import Defaults
>   File "/usr/local/tmda/TMDA/Defaults.py", line 1418, in ?
>     raise Errors.ConfigError, "Can't find key file: " + CRYPT_KEY_FILE
> TMDA.Errors.ConfigError: Can't find key file: /root/.tmda/crypt_key
>
>
> I recently upgraded from tmda-0.65 to tmda-0.68.  The script works fine in
> tmda-0.65.
>
> So my question is, what has changed, and how do I fix it?
>
> Thanks,
>
> Darley
> --
> PGP Key: www.thewares.net/drware.asc
>
> Dulce bellum inexpertis ("War is delightful to those who have no
experience
> of it.")  --Erasmus
> _____________________________________________
> tmda-users mailing list ([EMAIL PROTECTED])
> http://tmda.net/lists/listinfo/tmda-users
>

_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to