gpg script to remove passphrase from secret key

Kai-Min Sung kaisung at gmail.com
Tue Mar 29 03:27:23 CEST 2005


Hi,

I'm trying to write a script that will remove the passphrase from a
secret key.  Here's the command I'm using:

gpg --passphrase-fd 0 --command-fd 0 --edit-key user at domain.com < input

The input file looks like:

---input start---
oldpassphrase
passwd


save
quit
Y
---input end---

gpg doesn't seem to be reading the new passphrase from fd 0. The man
page says --passphrase-fd will only work if you're using one
passphrase, which is probably why this fails. Is there any other way
to make this work?

Thanks in advance,
-Kai



More information about the Gnupg-users mailing list