I want to change the passphrase from a command line, and Not from inside GNUPG

Aguilera, Luis laguilera@correoargentino.com.ar
Tue Aug 5 21:06:02 2003


This is my problem:
I want to change the passphrase from a command line, and Not from inside
Gnupg.
I'm developing a software based in webpages with PHP, that will send files
to other applications and that use keys generated with Gnupg to sign this
files.

When the software is installed in a new computer. I'm the person who
generate the keys that will use the New user. I need to give to the User a
tool, to They can change their Passphrase with a Frontend in PHP.
The user have to type his passphrase in the webpage PHP, then type the new
and re type the new one using a friendly Frontend. From PHP using the data
typed by the User, I want to execute Gnupg and change the passphrase.
Before to begin the develop in PHP, I was try to change my passphrase in DOS
mode giving to Gnupg all data needed in a command Line (my passphrase, The
new and the new again).
But, it doesn't work. Allways i've to type inside Gnupg this data.
I want to change the passphrase from a command line
I hope to be explicit!

With this command gnupg turns on the dialog mode.
gnupg --edit-key alejandro passwd
1. Enter passphrase:
2. Enter the new passphrase for this secret key.
    Enter passphrase:
3. Enter the new passphrase for this secret key.
    Repeat passphrase:
4. Save

I Want to change the passphrase without dialog mode:
 gnupg --edit-key alejandro passwd &pepe &toto &toto2
Using 
&pepe = my passphrase
&toto = the new passphrase
&toto2 = the retype passphrase

Luis Ernesto Aguilera - Analista de Sistemas 
GERENCIA DE SISTEMAS - CORREO ARGENTINO