gpg script in cron failed with "stdin must be a tty"

Carl L. Gilbert
Fri Aug 8 16:57:02 2003

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2003-08-08 at 10:30, Mike Hsu wrote:
> Finally got it to work with root.
> Still having problem with other user.

what do you mean with root? is the root a user that holds gpg keys on
yoru system?

> crontab:
>  DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/crontab.12587 installed on Fri Aug  8 07:14:39 2003)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
> 15 07 * * * su - oracle -c

What flavor of linux are you using?  Why did you edit crontab as opposed
to just putting the script in


> #!/bin/sh
> export GNUPGHOME=3D/home/oracle/.gnupg
> rm /usr/dba/junk.out
> gpg --output /usr/dba/junk.out --batch --no-tty --decrypt /usr/dba/junkx.=
> date > t.log

perhaps try=20
rm -f /usr/dba/junk.out

else rm could ask you to verify that you want to delete the file.  for
me it only asks when I am logged in as root, but I do not know what cron
will do.

also if you have sendmail installed, you may want to check roots mail to
see any cron error messages.

Thank you,

CL Gilbert
"Then said I, Wisdom [is] better than strength: nevertheless the poor
man's wisdom [is] despised, and his words are not heard." Ecclesiastes

GnuPG Key Fingerprint:
82A6 8893 C2A1 F64E A9AD  19AE 55B2 4CD7 80D2 0A2D
GNU Privacy Guard (Encryption and Digital

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.2.2 (GNU/Linux)