Encrypting Cron job email output.
simon
saulinux at safe-mail.net
Tue Aug 24 16:57:29 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 24 Aug 2004 15:18, Atom 'Smasher' wrote:
> On Tue, 24 Aug 2004, simon wrote:
> > here is the command and output from a shell ;
> > [root at localhost simon]# /usr/sbin/chkrootkit 2>&1 | gpg
> > --trust-model always -ear F679C9E6223DC22B | mail -s
> > "chkrootkit output" saulinux at safe-mail.net
> > gpg: F679C9E6223DC22B: skipped: public key not found
> > gpg: [stdin]: encryption failed: public key not found
> > Where am I going wrong? Is the command OK? My public key is
> > valid and on my keyring, why isn't it being seen?
> > Simon.
>
> ===============
>
> the cron job is run by root?
>
> is your key in the keyring at "~root/.gnupg/"?
>
This is the latest version of the command;
/usr/sbin/chkrootkit 2>&1 | gpg
- --keyring /home/simon/.gnupg/pubring.gpg --trust-model always -ear
0xE94E2292 | mail -s "chkrootkit output" saulinux at safe-mail.net
This produces exactly what I want when run as root on a terminal.
However, the same command run as a cron job by root falls down;
"Output from command /usr/sbin/chkrootkit 2>&1 | gpg
- --keyring /home/simon/.gnupg/pubring.gpg --trust-model always -ear
0xE94E2292 | mail -s "chkrootkit output" saulinux at safe-mail.net ..
gpg: fatal: ~/.gnupg: can't create directory: No such file or
directory
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768
Null message body; hope that's ok"
Any ideas?
Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBK1dhYreSoOlOIpIRAm3FAJ9OkgesVsc0UosFxY5x27BQ+bw2ZQCeORgL
kV83/fd2+TWA9ByaG+mw64k=
=bwau
-----END PGP SIGNATURE-----
More information about the Gnupg-users
mailing list