Hi Cathy,

We use /usr/libexec/gpg-preset-passphrase to set our passphrase. 

 /usr/libexec/gpg-preset-passphrase  -cP "$passphrase" $keygrip

  You would need to add this to your .gpg-agent.conf:

allow-preset-passphrase

you will need to get the KEYGRIP. The easiest way I found is:

gpg2 --fingerprint --fingerprint --list-secret-keys | grep "fingerprint" | cut 
-d= -f2 | tr -d ' '

make sure you get the correct one for the correct key( note the above command 
shows double the number of keygrips for what you need.. ).
        
and you may want to adjust your max-cache-ttl gpg-agent.conf too.  If you want 
to forget a passphrase before the ttl is up, you can use gpg-preset-passphrase 
to forget it.

Rel6 does provide a pinentry-curses program:

/usr/bin/pinentry-curses


Hope that helps!

Message: 7
Date: Wed, 25 Feb 2015 16:51:23 +0000
From: "Smith, Cathy" <cathy.sm...@pnnl.gov>
To: Damien Goutte-Gattat <dgouttegat...@incenp.org>,
        "gnupg-users@gnupg.org" <gnupg-users@gnupg.org>
Subject: RE: how to disable pinentry
Message-ID:
        <270838a78e5a5342bb9669898fb4cf2011cf3...@ex10mbox01.pnnl.gov>
Content-Type: text/plain; charset="iso-8859-1"

Damien

Adding this line didn't work:
        pinentry-program /usr/bin/pinentry-tty

The message was invalid option
        gpg: /home/foo/.gunpg/gpg.conf:242:  invalid option

The CentOS6 and RHEL6 distributions don't  provide a /usr/bin/pinentry-tty.   

One of my goals of this is to be able to set a passphrase on a key in batch 
processing.  Perhaps, there is another way to accomplish that?


Thank you

Cathy
---
Cathy L. Smith
IT Engineer

Pacific Northwest National Laboratory
Operated by Battelle for the
U.S. Department of Energy

Phone:????? 509.375.2687
Fax:??? ????509.375.2330
Email:????? cathy.sm...@pnnl.gov


CONFIDENTIALITY NOTICE: This message, including attachments, is intended to be 
viewed only by the addressee. It may contain information that is privileged, 
confidential and/or exempt from disclosure under applicable law. No 
confidentiality or privilege is lost by any transmission error. This message 
may contain nonpublic personal information about consumers subject to the 
restrictions of the Gramm-Leach-Bliley Act and the Sarbanes-Oxley Act. You may 
not directly or indirectly reuse or disclose such information for any purpose 
except as permitted by law. Any dissemination, distribution or copying of this 
message is strictly prohibited without our prior written permission. If you are 
not an intended recipient, or if you have received this message in error, 
please notify us immediately by return e-mail and permanently remove the 
original message and any copies from your computer and all back-up systems.

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

Reply via email to