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

Steve Butler sbutler@fchn.com
Thu Aug 7 23:33:02 2003


Does cron know about the HOMEDIR environment variable?  I have some scripts
that run under cron (pull encrypted files off the ftp server and bring them
inside the firewall before decrypting), but they force the environment to be
set up.  The crontab entries for 'root' that do this look like:

SHELL=/bin/ksh
MAILTO=""
# MAILTO=sbutler@fchn.com
MYENV=/usr/xrg_dba/conf/env.oracle
MYBIN=/usr/xrg_dba/bin
LBIN=/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


The $MYENV (/usr/xrg_dba/conf/env.oracle) sets up a whole slew of Linux and
database variables so that the environment for the scripts looks correct
when running from cron.

-----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"


Key rings and keys are created without passphrase/
I am having the same problem with encrypt in cron.

Mike Hsu (mhsu@nglm.com)





-----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"


PS  You will also have to pass in the pass phrase or ensure that there is no
pass phrase on your secret key.


-----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"


Cron Usage:  use the --batch and --no-tty options to gpg.

gpg --batch --no-tty --output junk.txt --decrypt junk2.gpg


-----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"


	A simple gpg script with no passphrase needed:
	gpg --output junk.txt --decrypt junk2.gpg

	runs OK in bash but fails in cron job.

	I get the following message in mail:
	stdin must be a tty

	How can I fix this?



Mike Hsu (mhsu@nglm.com)
Database Technologist
Northrop Grumman IT
Defense Enterprise Solutions
La Mesa, CA   
619-460-2281 x 237





_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


CONFIDENTIALITY NOTICE:  This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
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.


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


CONFIDENTIALITY NOTICE:  This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
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.


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


CONFIDENTIALITY NOTICE:  This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential 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.