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

Carl L. Gilbert lamont_gilbert@rigidsoftware.com
Fri Aug 8 18:04:01 2003


--=-0KBNz79rmnTtgS3XC2nR
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2003-08-08 at 11:06, Mike Hsu wrote:
> I am running RedHat Linux AS 2.1.
> I duplicate the process as root and it worked.
> (logged in as root, create the keyrings and keys without passphrase, expo=
rt, import, ...)
>=20
> I am sure it's not the "rm", I tried it with or without "-f".
>=20
> Mike Hsu (mhsu@nglm.com)
>=20

yes, but you should be using rm -f anyway.  In what way does the process
fail if you try it as a normal user?





>=20
>=20
>=20
> -----Original Message-----
> From: Carl L. Gilbert [mailto:lamont_gilbert@rigidsoftware.com]
> Sent: Friday, August 08, 2003 7:58 AM
> To: Mike Hsu
> Cc: GnuPG Users Group
> Subject: RE: gpg script in cron failed with "stdin must be a tty"
>=20
>=20
> 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
>=20
> what do you mean with root? is the root a user that holds gpg keys on
> yoru system?
>=20
> > 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
>=20
> What flavor of linux are you using?  Why did you edit crontab as opposed
> to just putting the script in
>=20
> /etc/cron.hourly
> or=20
> /etc/cron.daily
> etc.?
>=20
> >=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/junk=
x.gpg
> > date > t.log
> >=20
> >=20
>=20
> perhaps try=20
> rm -f /usr/dba/junk.out
>=20
> 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.
>=20
> 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)

--=-0KBNz79rmnTtgS3XC2nR
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/M8ozVbJM14DSCi0RAqryAKCQoSB+FObDc5qFrNTHQvwfjaAiAACgxhvc
JrzkMhqiCONfgPpTYVXmOtw=
=9hdJ
-----END PGP SIGNATURE-----

--=-0KBNz79rmnTtgS3XC2nR--