LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-18-2006, 01:57 PM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Rep: Reputation: 47
Copying the gpg folder on to a floppy drive


When you install the GnuPG software, it will create the following folder on the system. [ /.gnupg ].

I must copy it on to a USB or a floppy disk to preserve the data.

All the details like my public key, private key will be on that folder.

I found the following from a website.

It teaches me how to copy everything on that '' /.gnupg '' folder to a floppy disk. However, I can't fathom out the description.


This '--homdir ' is on any Linux system is 'gnupg'. So I will write the word 'gnupg' instead of 'homdir'.


How do I use this '' --homedir /my/path/ '' this option?


Do I have to write something to the path?

Are you able to tell me how to do this?
I don't need any help on key making.
The following teaches me how to copy on to a floppy. I can't fathom out their description.
Please read the following description carefully.
------------------------------------------------------------------------------------------------------------------------------------------
4.18) How do I put my keyring in a different directory?

GnuPG keeps several files in a special homedir directory.
These include the options file, pubring.gpg, secring.gpg, trustdb.gpg, and others.
GnuPG will always create and use these files. On unices, the homedir is usually ~/.gnupg; on Windows "C:\gnupg\".
If you want to put your keyrings somewhere else, use the option:
--homedir /my/path/
to make GnuPG create all its files in that directory. Your keyring will be "/my/path/pubring.gpg".

This way you can store your secrets on a floppy disk.
Don't use "--keyring" as its purpose is to specify additional keyring files.

Last edited by Gins; 12-18-2006 at 02:05 PM.
 
Old 12-18-2006, 02:33 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
When I've needed to move my gnupg keys to a new location, I've always just exported the public and private keys to a USB drive. Then I import them at the new location. (Oh, and then I have to mess with the trust level.)

So it seems likely that the documented method you're describing is better.

I would read that documentation to mean that you need to do something like
Code:
gpg --homedir /mnt/some-dir
where 'some-dir' is the location you've mounted your floppy or usb drive to.
 
Old 12-18-2006, 03:31 PM   #3
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks anomie
So it is nice to know that you too use the gpg.
I can test several times to see how it works.
As you know the system will create the folder ( /.gnupg )

Is it possible to erase it? As a root user, you could erase your folders and files. I suspect this folder is not erasable.
When you want to make some trials to see how it works, you should be able to install and erase.

Is this folder possible to erase?
--------------------------------------------------------------------------------------------------------------------------------
gpg --homedir /mnt/some-dir
The above command you suggested won't copy the files to your USB memory. Let us say I decided to reinstall the FC5 again. I must be able to install my 'gpg' without any hassle.

You can use the command 'gpg --gen-key ' and creates so many keys.

How do I insert the keys, ring, IDs, etc if I reinstall FC5?


It is not a question of making a pair of keys.
You should be able to use the keys for many years.
It is common for us to install new version of Linux from time to time.

I would like to hear from you again.

Last edited by Gins; 12-18-2006 at 03:33 PM.
 
Old 12-18-2006, 03:56 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Gins, keeping in mind that I am not a gnupg expert (and that there may be a best practice that I'm overlooking), here's what I would suggest:
Code:
$ gpg --export > pubkeys
$ gpg --export-secret-keys > privkeys
Then copy both pubkeys and privkeys to your usb drive. Next, using the --import command, bring them into your other gnupg client environment. There are some tips for doing that in the GNU Privacy Handbook here: http://www.gnupg.org/gph/en/manual.html#AEN84

Remember to be careful where you keep your private keys.
 
Old 12-18-2006, 04:22 PM   #5
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks anomie
Have you ever changed computers and transferred the gpg keys?
I mean you may have erased the existing Linux version and installed a new version.
Then it should work smoothly to transfer the keys.

As you mentioned exporting, importing keys and transferring to a USB memory works fine.

When you install again gpg on your computer, it should be possible to use the same old keys.

You can make keys using the same old passphrase.
But the keys will not be the same.
You might tell me that it is possible to revoke the old keys and publish new keys on public key servers.
It is not a neat solution, as far as I am concerned.

1. You can have your old keys on a USB.
2. You can have your old ID on a USB.
3. You can have same old passphrase on a USB.

Last edited by Gins; 12-18-2006 at 04:24 PM.
 
Old 12-18-2006, 05:23 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Have you ever changed computers and transferred the gpg keys?
Yes I have -- using the method I described. I've done this several times.

Make sure to test this out (between two different machines perhaps) to confirm it works for you and so that you're comfortable with it.
 
Old 12-19-2006, 06:55 AM   #7
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Could you keep the same keys after changing the operating systems?

Because it generates keys using its own process of key generation. It can't be the same keys.

When you get new keys, you have to tell your friends about new keys and revoke the old ones.
 
Old 12-19-2006, 10:45 AM   #8
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Could you keep the same keys after changing the operating systems?
Sure, just import them as we discussed. You don't need to generate new keys unless you want to.
 
Old 12-19-2006, 04:07 PM   #9
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
What you say is interesting to me.

This means when you install the 'pgp' software, it will create the ( /.gnupg ) folder.

I thought it would create the folder when generating the keys.

------------------------------------------------------------------------------------------------------------------------------

[root@c83-250-99-43 gnupg]# find / -name gnupg
find: WARNING: Hard link count is wrong for /selinux: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
/usr/lib64/gnupg
/usr/share/gnupg
[root@c83-250-99-43 gnupg]#
-----------------------------------------------------------------------------------------------------------------------

[root@c83-250-99-43 gnupg]# cd /usr/lib64/gnupg
[root@c83-250-99-43 gnupg]# ls
gpgkeys_finger
gpgkeys_hkp
gpgkeys_http
gpgkeys_ldap
[root@c83-250-99-43 gnupg]#
 
Old 12-19-2006, 04:42 PM   #10
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Gins, my comments are only in regard to gnupg. I really don't know anything about pgp.
 
Old 12-20-2006, 04:29 AM   #11
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
anomie
I made a mistake.
I am talking about 'gpg'.
When you write, you easily mixed up those words.
I have PGP on the windows side of this computer.
I never use windows. I like open source.
When the computer starts, I could go to the windows side if I want to work with windows XP.
PGP for windows is an expensive product. It will cost about 1500.00 US dollars. I have the latest version of PGP. It is a cracked program.

I would like to get your public key. Would you like to give it to me?
I want to know your name or email address which you have given to the 'gpg' program.

Very soon I will create keys. Your comments gave me some impetus to make a new pair of keys.

I have an old public key. You could download it. I didn't make any revocation certificate. I didn't make any backup of or copied the keys to a USB memory. I made a big blunder this was a couple of months ago. I was forced to reinstall the FC5 and lost everything. So it is a dead key. I can't remove it from the public key servers. This time I will do a neat job.

Are you in the following list?
-----------------------------------------------------------------------------------------------------------------------------------

Public Key Server -- Index ``anomie ''

Type bits /keyID Date User ID
pub 1024D/9DA3E83D 2004/02/20 Yoann Pigné <yoann.pigne@gmail.com>
Yoann Pigné <yoann.pigne@free.fr>
Yoann Pigne ('e' accent aigu) <anomie@popstar.com>
Yoann Pigne ('e' accent aigu) <yoann.pigne@free.fr>
Yoann Pigne ('e' accent aigu) <yoann.pigne@laposte.net>
pub 1024D/904C917B 2004/02/05 Kyle M. Hall <kyle@anomie.cc>
pub 1024D/604EC608 2001/02/04 hr <john@anomie.org>
pub 1024D/C955A041 2001/01/29 datarate <john@anomie.org>
pub 1024D/A297216E 2000/05/29 *** KEY REVOKED ***
Chris Farmer <anomie@ev1.net>
Chris Farmer <chris.farmer@trilogy.com>
pub 1024D/25AE2509 2000/05/29 Chris Farmer <anomie@ev1.net>
Chris Farmer <chris@farmerchris.com>
Chris Farmer <chris.farmer@wavefly.com>
pub 1024D/06F5AA85 2000/05/29 Chris Farmer <anomie@ev1.net>
pub 1024D/F54B615D 1999/11/17 Brad - <lists@anomie.ods.org>
Brad - <lists@anomie.dhis.net>
Brad - <lists@anomie.nailed.org>
Brad - <lists@anomie.phrozen.org>
pub 1024R/8A64B5B9 1999/08/16 Brad <lists@anomie.dhis.org>
pub 1024D/C7C066EF 1998/12/08 jadair <john@anomie.org>
pub 1024D/67D959E5 1998/04/09 anomie <anomie@geocities.co.jp

Last edited by Gins; 12-20-2006 at 05:03 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying MySQL data folder from Windows to Linux anjanesh Linux - General 2 05-09-2006 06:38 AM
Error Copying File or Folder nysethe Linux - Networking 3 08-17-2004 01:06 PM
floppy disk copying... xamdbz01 Fedora 3 07-26-2004 12:54 AM
Mountind drives / Copying file from home drive to floppy ozwalker Linux - Newbie 1 09-04-2003 09:06 PM
Copying to floppy drive kau Linux - Newbie 3 05-13-2002 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration