Unable to change passphrase

sansay sansay1 at gmail.com
Fri Apr 26 00:35:25 CEST 2013


sansay <sansay1 <at> gmail.com> writes:

> 
> Hi all,
> 
> I am completely stumped.
> I can't change the passphrase on a gpg key. Here is the whole interaction:
> 
> bash-4.1$ gpg --edit-key 8267977F
> gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> Secret key is available.
> 
> pub  2048R/8267977F  created: 2013-01-16  expires: never       usage: SC
>                      trust: unknown       validity: unknown
> sub  2048R/3F32FB05  created: 2013-01-16  expires: never       usage: E
> [ unknown] (1). am_prod <navsrv <at> blackhole.sm.net>
> 
> Command> passwd
> Key is protected.
> 
> You need a passphrase to unlock the secret key for
> user: "am_prod <navsrv <at> blackhole.sm.net>"
> 2048-bit RSA key, ID 8267977F, created 2013-01-16
> 
> gpg: cancelled by user
> Can't edit this key: General error
> 
> Command>
> 
> Thanks for your help.
> 

OK I finally figured it all out.

The special user which runs the apps on this host, doesn't have the proper
TTY rights when I sudo to it. So, gpg being unable to show the TTY GUI, just
fails without giving the real reason.
In order to be able to do this I had to exit my navsrv sudo session, and
make the following call:
chmod o+rw `tty` && sudo -i -u navsrv gpg --edit-key 8267977F

Next, I entered the navsrv login password.
Then, at the gpg command prompt, when I did "passwd", I got the Enter
Passphrase GUI.






More information about the Gnupg-users mailing list