Change Passphrase in Batch Mode

Daniel Kilimnik at
Wed Mar 16 09:26:15 CET 2022

I am trying to change a passphrase of my gpg keys as part of a script. I
saw the --change-passphrase option, but I could not get it to work in batch
mode. With --pinentry-mode loopback --passphrase-fd 0 activated. It asks
for my current passphrase, but then exits with a success.

The whole command I used was this:
gpg --pinentry-mode loopback --status-fd 2 --no-tty --no-verbose --batch
--home /tmp/keys --passphrase-fd 0 --change-passphrase

Maybe somone has an idea how to do this properly.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gnupg-users mailing list