Changing key's passphrase in an automated way

gnupgpacker gnupgpack at on.yourweb.de
Sat Dec 6 20:32:42 CET 2014


Hello,

did try it too:

Thomas' attempt gave me with Gpg-1.4.18:
gpg: verwende Vertrauensmodell PGP
[GNUPG:] GET_LINE keyedit.prompt
[GNUPG:] GOT_IT
[GNUPG:] USERID_HINT 5D4F1C79E62651B3 testpassw tester (44) <test44 at edu.com>
[GNUPG:] NEED_PASSPHRASE 5D4F1C79E62651B3 5D4F1C79E62651B3 1 0
[GNUPG:] BAD_PASSPHRASE 5D4F1C79E62651B3
[GNUPG:] GET_LINE keyedit.prompt
[GNUPG:] GOT_IT


John's hint with 
ECHO -e PASSWD\nMyOldPassword\nMyNewPassword\nSAVE|GPG --command-fd 0 --no-tty --passphrase-repeat 0 --status-fd 2 --verbose --edit-key E62651B3
gave me just:
gpg: verwende Vertrauensmodell PGP
[GNUPG:] GET_LINE keyedit.prompt
[GNUPG:] GOT_IT
[GNUPG:] GET_LINE keyedit.prompt
[GNUPG:] GOT_IT

It seems that old password isn't accepted by batch cmd. Why?

MyOldPassword is definitely correct and works if editing same test key for example with addkey !?

Thanks, Chris





> -----Original Message-----
> From: Gnupg-users [mailto:gnupg-users-bounces at gnupg.org] On Behalf Of
> Thomas Pelletier
> Sent: Saturday, December 06, 2014 12:54 PM
> To: John Kennerson; gnupg-users at gnupg.org
> Subject: Re: Changing key's passphrase in an automated way
> 
> On Sat Dec 06 2014 at 12:15:53 AM John Kennerson <nobody at isis.cpunk.us>
> wrote:
> 
> 	ECHO -e PASSWD\nOLDPASS\nNEWPASS\nSAVE|GPG --command-fd 0 --no-tty -
> -passphrase-repeat
> 	0 --status-fd 2 --verbose --edit-key 9C6BD0AC
> 
> 
> 
> Awesome! It did the trick with GPG 1.4.
> 
> Thank you,
> Thomas




More information about the Gnupg-users mailing list