change passphrase in batch mode
Henry Hertz Hobbit
hhhobbit at securemecca.net
Tue Jul 30 04:42:49 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
On 07/29/2013 11:02 PM, Hauke Laging wrote:
> is it possible to change a passphrase in batch mode?
>From what the man pages say, no. You can delete keys and there
is experimental key creation with notes in the doc/DETAILS of
of the source code on how to do that. Alterations to code?
Look at the experimental key creation to get some ideas.
You are of course free to investigate using expect, expectk, or
tk on Linux / Unix. Things like sh / ksh / bash, PERL, BAT, or
PowerShell won't work. I haven't looked at the GnuPG source
code in a long time but if which ever of gpg or gp2 you are
using does a dup() or dup2() of STDIN then after the
"gpg --edit-key KEY" then an internal passwd command you will
have to wait before giving it the old pass-phrase, new
pass-phrase, and then save.
For two way across distance the other side may need the new
public key after the pass-phrase change (not tested). I would
backup my ~/.gnupg ('nix) or gnupg (somewhere down inside your
Windows %UserProfile% folder) before doing tests in case you
do irreperable damage.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the Gnupg-users