gpg script in cron failed with "stdin must be a tty"
Carl L. Gilbert
Fri Aug 8 18:04:01 2003
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, ...)
> I am sure it's not the "rm", I tried it with or without "-f".
> Mike Hsu (firstname.lastname@example.org)
yes, but you should be using rm -f anyway. In what way does the process
fail if you try it as a normal user?
> -----Original Message-----
> From: Carl L. Gilbert [mailto:email@example.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"
> 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 testdec.sh
> What flavor of linux are you using? Why did you edit crontab as opposed
> to just putting the script in
> > 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=
> > 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.
"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 http://www.gnupg.org (Encryption and Digital
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)
-----END PGP SIGNATURE-----