PGP problem, do I have keys made or not, ha.

Asked by tim

I'm familar somewhat with pgp in windows, however it has proven challenge getting it going in linux. In fact a manage to crash my OS just a week ago in pursuit of the task. Anyway, it seemed I made the keys via terminal, however when I go to seahorse or GNU, they both act as though no keys exist. Thanks for your time and help in advance, Tim

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
tim
Solved:
Last query:
Last reply:

This question was reopened

  • by tim
Revision history for this message
Steven Danna (ssd7) said :
#1

Please paste the output of the following commands:

gpg --list-secret-keys
gpg --list-public-keys

Those will show you what public and private keys that you have. If your private key is not listed by the first command, then you don't have one. By any chance, when attempting to create the keys did you use "sudo." If you did, then the keys would have been created for the root users. To see if this may have happened run:

sudo gpg --list-secret-keys
sudo gpg --list-public-keys

There are good directions for creating GPG keys here:

https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Using%20GnuPG%20to%20generate%20a%20key

Revision history for this message
tim (brucetim100) said :
#2

Thanks for your help.
Yes, that is what happened, the keys have been created by root users. Any simple way to get them back? Or should I just make new keys, and how to dispose of the other ones?

brucetim@Ace:~$ sudo gpg --list-secret-keys
[sudo] password for brucetim:
gpg: WARNING: unsafe ownership on configuration file `/home/brucetim/.gnupg/gpg.conf'
/home/brucetim/.gnupg/secring.gpg
---------------------------------
sec 1024D/EEBD531A 2009-06-07
uid brucetim <email address hidden>
ssb 2048g/283A0735 2009-06-07

sec 1024D/A699AFE5 2009-06-07
uid brucetim <email address hidden>
ssb 2048g/BC7DA238 2009-06-07

brucetim@Ace:~$ gpg --list-public-keys
gpg: can't open `/home/brucetim/.gnupg/pubring.gpg'
gpg: keydb_search_first failed: file open error
brucetim@Ace:~$ sudo gpg --list-secret-keys
gpg: WARNING: unsafe ownership on configuration file `/home/brucetim/.gnupg/gpg.conf'
/home/brucetim/.gnupg/secring.gpg
---------------------------------
sec 1024D/EEBD531A 2009-06-07
uid brucetim <email address hidden>
ssb 2048g/283A0735 2009-06-07

sec 1024D/A699AFE5 2009-06-07
uid brucetim <email address hidden>
ssb 2048g/BC7DA238 2009-06-07

brucetim@Ace:~$ sudo gpg --list-public-keys
gpg: WARNING: unsafe ownership on configuration file `/home/brucetim/.gnupg/gpg.conf'
/home/brucetim/.gnupg/pubring.gpg
---------------------------------
pub 1024D/9072870B 2007-08-13 [expires: 2009-08-12]
uid jre-phoenix (moblock-deb maintainer) <email address hidden>
sub 1024g/1E5C7A1D 2007-08-13 [expires: 2009-08-12]

pub 1024D/EEBD531A 2009-06-07
uid brucetim <email address hidden>
sub 2048g/283A0735 2009-06-07

pub 1024D/A699AFE5 2009-06-07
uid brucetim <email address hidden>
sub 2048g/BC7DA238 2009-06-07

Revision history for this message
Steven Danna (ssd7) said :
#3

Try the following run the following commands and look at the output:

ls -al .gnupg
ls -al .gnupg/pubring.gpg
ls -al .gnupg/secring.gpg

The output will show you the owner. If the owner is "root" try the following:

sudo chown -R brucetim .gnupg

Now try the following commands

gpg --list-secret-keys
gpg --list-public-keys

This should change the owner of the keys back to your user allowing programs like seahorse to see them.

Revision history for this message
tim (brucetim100) said :
#4

That was the web page I used for creating my keys. When I got to this part I was a bit perplexed:

 It is probably a good idea to set this key as default in your .bashrc. Doing this will allow applications using GPG to automatically use your key.

    *

      Set your key as the default key by entering this line in your ~/.bashrc.

      export GPGKEY=D8FC66D2

          o Please note that will be sourced only during your next session, unless you source it manually.
    * Now restart the gpg-agent and source your .bashrc again:

      killall -q gpg-agent
      eval $(gpg-agent --daemon)
      source ~/.bashrc

Revision history for this message
Steven Danna (ssd7) said :
#5

I believe that those part of the directions is simply to set the default key
for your user. If that isn't set, most programs will simply ask you what
key to use or choose a key based on what email address you used.

Did the chown command work for you?

Revision history for this message
tim (brucetim100) said :
#6

Thanks for asking again, I missed that....and oh yea oh yea it works!! Thanks so much! By chance you wouldn't have any insight on my other problem regarding abode flash player under my name, 'tim'? Again really appreciate your help with the keys; I have been stumped for a couple days.

Revision history for this message
tim (brucetim100) said :
#7

Oh, I have 2 keys! I guess I'll just ignore one of them. They are identical except for key id, and fingerprint.

Revision history for this message
tim (brucetim100) said :
#8

Thanks again!