gpg script in cron failed with "stdin must be a tty"
Mike Hsu
mhsu@nglm.com
Fri Aug 8 16:33:02 2003
Finally got it to work with root.
Still having problem with other user.
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 testdec.sh
testdec.sh:
#!/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.gpg
date > t.log
Mike Hsu (mhsu@nglm.com)
-----Original Message-----
From: Carl L. Gilbert [mailto:lamont_gilbert@rigidsoftware.com]
Sent: Friday, August 08, 2003 7:16 AM
To: Mike Hsu
Cc: GnuPG Users Group
Subject: Re: gpg script in cron failed with "stdin must be a tty"
On Thu, 2003-08-07 at 13:07, Mike Hsu wrote:
> A simple gpg script with no passphrase needed:
> gpg --output junk.txt --decrypt junk2.gpg
>=20
> runs OK in bash but fails in cron job.
>=20
cron uses bash. You mean it runs OK while you are logged in, but fails
when you attempt to do it without being logged in.
> I get the following message in mail:
> stdin must be a tty
>=20
That error message is probably incorrect.
> How can I fix this?
>=20
> Mike Hsu (mhsu@nglm.com)
>=20
>=20
>=20
>=20
>=20
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
--=20
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
9:16
GnuPG Key Fingerprint:
82A6 8893 C2A1 F64E A9AD 19AE 55B2 4CD7 80D2 0A2D
GNU Privacy Guard http://www.gnupg.org (Encryption and Digital
Signatures)