gpg script in cron failed with "stdin must be a tty"
Carl L. Gilbert
lamont_gilbert@rigidsoftware.com
Fri Aug 8 16:57:02 2003
--=-on1BCfK1HAaG4FEaguwp
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.
>=20
> Still having problem with other user.
>=20
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 testdec.sh
>=20
What flavor of linux are you using? Why did you edit crontab as opposed
to just putting the script in
/etc/cron.hourly
or=20
/etc/cron.daily
etc.?
>=20
> 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
>=20
>=20
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.
--=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)
--=-on1BCfK1HAaG4FEaguwp
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQA/M7qBVbJM14DSCi0RAl+nAJ9kp4/2TxobEOVXJ3rtDQV6HYUCwQCfTGWD
u6eSCno4qqxIYmwv1r77TaY=
=VKm9
-----END PGP SIGNATURE-----
--=-on1BCfK1HAaG4FEaguwp--