gpg script in cron failed with "stdin must be a tty"
Carl L. Gilbert
lamont_gilbert@rigidsoftware.com
Thu Aug 7 23:58:02 2003
--=-alNSu8QEq08aAJDkGD8a
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Thu, 2003-08-07 at 17:34, Steve Butler wrote:
> Does cron know about the HOMEDIR environment variable? I have some scrip=
ts
> that run under cron (pull encrypted files off the ftp server and bring th=
em
> inside the firewall before decrypting), but they force the environment to=
be
> set up. The crontab entries for 'root' that do this look like:
>=20
wouldnt homedir be setup by a login script!? cron is run by the system,
so I would suspect it does not.
if you want to run processes as a user I think you can use=20
'at'
man at
> SHELL=3D/bin/ksh
> MAILTO=3D""
> # MAILTO=3Dsbutler@fchn.com
> MYENV=3D/usr/xrg_dba/conf/env.oracle
> MYBIN=3D/usr/xrg_dba/bin
> LBIN=3D/usr/lbin
> 01,06,11,16,21,26,31,36,41,46,51,56 * * * * . $MYENV; $MYBIN/edi_in
> 04,09,14,19,24,29,34,39,44,49,54,59 * * * * . $MYENV; $MYBIN/edi_out
>=20
>=20
> The $MYENV (/usr/xrg_dba/conf/env.oracle) sets up a whole slew of Linux a=
nd
> database variables so that the environment for the scripts looks correct
> when running from cron.
>=20
> -----Original Message-----
> From: Mike Hsu [mailto:mhsu@nglm.com]
> Sent: Thursday, August 07, 2003 1:25 PM
> To: Steve Butler; gnupg-users@gnupg.org
> Subject: RE: gpg script in cron failed with "stdin must be a tty"
>=20
>=20
> Key rings and keys are created without passphrase/
> I am having the same problem with encrypt in cron.
>=20
> Mike Hsu (mhsu@nglm.com)
>=20
>=20
>=20
>=20
>=20
> -----Original Message-----
> From: Steve Butler [mailto:sbutler@fchn.com]
> Sent: Thursday, August 07, 2003 12:06 PM
> To: gnupg-users@gnupg.org
> Subject: RE: gpg script in cron failed with "stdin must be a tty"
>=20
>=20
> PS You will also have to pass in the pass phrase or ensure that there is=
no
> pass phrase on your secret key.
>=20
>=20
> -----Original Message-----
> From: Steve Butler [mailto:sbutler@fchn.com]
> Sent: Thursday, August 07, 2003 11:49 AM
> To: gnupg-users@gnupg.org
> Subject: RE: gpg script in cron failed with "stdin must be a tty"
>=20
>=20
> Cron Usage: use the --batch and --no-tty options to gpg.
>=20
> gpg --batch --no-tty --output junk.txt --decrypt junk2.gpg
>=20
>=20
> -----Original Message-----
> From: Mike Hsu [mailto:mhsu@nglm.com]
> Sent: Thursday, August 07, 2003 10:18 AM
> To: gnupg-users@gnupg.org
> Subject: gpg script in cron failed with "stdin must be a tty"
>=20
>=20
> 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
> I get the following message in mail:
> stdin must be a tty
>=20
> How can I fix this?
>=20
>=20
>=20
> Mike Hsu (mhsu@nglm.com)
> Database Technologist
> Northrop Grumman IT
> Defense Enterprise Solutions
> La Mesa, CA =20
> 619-460-2281 x 237
>=20
>=20
>=20
>=20
>=20
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>=20
>=20
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, =
is
> for the sole use of the intended recipient(s) and may contain confidentia=
l
> and privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, pleas=
e
> contact the sender by reply e-mail and destroy all copies of the original
> message.
>=20
>=20
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>=20
>=20
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, =
is
> for the sole use of the intended recipient(s) and may contain confidentia=
l
> and privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, pleas=
e
> contact the sender by reply e-mail and destroy all copies of the original
> message.
>=20
>=20
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>=20
>=20
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, =
is for the sole use of the intended recipient(s) and may contain confidenti=
al and privileged information. Any unauthorized review, use, disclosure or=
distribution is prohibited. If you are not the intended recipient, please=
contact the sender by reply e-mail and destroy all copies of the original =
message.
>=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)
--=-alNSu8QEq08aAJDkGD8a
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/MsvPVbJM14DSCi0RAhM3AKDPH/RCVeUvfKNWGhzwJtt5l4zqEgCgsyv8
Lq1YTgIVZ/Y0ecOVe/zhlbI=
=mnUS
-----END PGP SIGNATURE-----
--=-alNSu8QEq08aAJDkGD8a--