gpg on cron task

Anders Zachrison andza at ikp.liu.se
Tue Feb 7 08:09:53 CET 2006


* enediel gonzalez <enediel at hotmail.com> [060206 16:57]:

> #!/bin/bash
> cd /tmp/backup && /bin/echo apassword | /usr/bin/gpg -se --passphrase-fd 0 
> --logger-fd 1 -r enediel at hotmail.com /tmp/backup/backup20060206100521 >> 
> /tmp/debug3.txt

> Executing it from a cron task I obtained in /tmp/debug3.txt the following 
> line
> gpg: cannot open `/dev/tty': No such device or address

As you are going to run gpg from a cron job, ie without any associated
tty, have you checked `man gpg`? Especially the options '--batch' and
'--no-tty'?

You're running gpg as a batch job and from cron, ie no tty available.
GPG can in some occasions still print warnings to the tty even though
--batch is used as on option.

/Anders

-- 
All theoretical chemistry is really physics;
and all theoretical chemists know it.
		-- Richard P. Feynman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/attachments/20060207/9dbb180a/attachment.pgp


More information about the Gnupg-users mailing list