can't copy entire .gnupg folder to another machine
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
can't copy entire .gnupg folder to another machine
I am a somewhat new newbie to Linux (xubuntu 16.04 LTS). My home drive is encrypted and Thunderbird with enigmail works great.
I've been playing with encryption in Thunderbird. It works fine, was easy to set up and I suspect if everyone knew how easy it was, they'd be using encrypted email too.
However, there is a problem.
I use the same linux version in my older laptop, and want to copy the keys over to the laptop machine so I can take the laptop with me on the road.
I believe all I have to do to make the encryption work on the laptop is to copy the .gnupg folder into my home directory from my desktop to my laptop. I used the info at https://www.phildev.net/pgp/gpg_moving_keys.html, which states that the operation is simple. So, I created an archive of the .gnupg folter and moved the archive to my other machine. I then extracted the archive, but it is smaller than the source folder and there are 2 files missing after extraction.
Those files are S.gpg-agent and pubring.gpg~
How do I complete the copy to the laptop so I can take it with me when I travel?
TIA
Additional info: I found some web resources that address a similar topic, but because I'm a newbie, I can't even begin to understand the technical portions of the other web publications.
How do I complete the copy to the laptop so I can take it with me when I travel?
Considering you have given us zero info re what you did, and what didn't work, how can we answer that ?.
Quote:
Additional info: I found some web resources that address a similar topic, but because I'm a newbie, I can't even begin to understand the technical portions of the other web publications.
And we are expected to be clairvoyant ?. Show us links.
I created an archive of the .gnupg folter and moved the archive to my other machine. I then extracted the archive, but it is smaller than the source folder and there are 2 files missing after extraction.
Those files are S.gpg-agent and pubring.gpg~
S.gpg-agent is not a regular file, it is a Unix domain socket opened by gpg-agent when it starts running. There is no sense in copying it anywhere.
pubring.gpg~ is just backup file of pubring.gpg, it should not be needed for correct operation.
Quote:
How do I complete the copy to the laptop so I can take it with me when I travel?
For syg00, I did exactly what I said in the original post, see below. Sorry it wasn't acceptable. I did give the URL for the instructions I used. And, I thought I said what I did, although it was brief.
Quote:
I used the info at https://www.phildev.net/pgp/gpg_moving_keys.html, which states that the operation is simple. So, I created an archive of the .gnupg folter and moved the archive to my other machine. I then extracted the archive, but it is smaller than the source folder and there are 2 files missing after extraction.
============================
For ntubski, thanks so much. I did look for the purpose of those files using duckduckgo, but most of the links I looked at were a little advanced for my level of understanding though. I will try it out before departing, I have to leave for the airport in about 7 hours. I'll post something if I have the time before departing. If I can't get to it before I leave, I'll try it when I get to my destination.
I didn't try using the command line, so I think that means I didn't try it with sudo. Command line isn't my strength at this time, although I realize it is extremely important.
My exact method of the copy attempt was to shut down Thunderbird, migrate to ~/.gnupg, then right click on the folder and create an archive, all using gui. Then I dragged and dropped the archive file into the laptops (after renaming the original existing folder). When I compared the contents of both folders, the laptop folder was smaller and 2 files were not present.
Note that I didn't even try to use Thunderbird on the laptop.
I won't be able to give further info until I arrive at my destination. I will try again later when I have a spare moment.
I just did a screen capture showing the permissions for the 2 files and for the .gnupg folder, see attachment.
I tried to run Thunderbird on my laptop, using the .gnupg folder from my desktop. No joy, but it's probably close to working::>
Note that I am attempting to migrate to my laptop install, same OS and also using an encrypted home folder. On my laptop, I replaced the .thunderbird folder with the latest .thunderbird folder from my desktop punchbox (after renaming the old .thunderbird folder). I renamed the existing .gnupg laptop file with the file taken from my desktop system. I installed enigmail on the laptop system.
I get an error message when I try to send an encrypted email however and got an error message saying it couldn't find the necessary keys. I went to the sent mailbox and tried to decrypt a message that had been sent to me previously, and got a very similar error. I thought the .gnupg folder contained the keys??
Unencrypted email can be sent and received with no errors.
Is there some step that I didn't do? I got no sign of any errors during the entire migration process, until such time as I tried to send an encrypted email.
For Fat, I'm good with the copy command, although I still tend to use gui due to my years running the brand W/MS Operating System (ie non open source). Old habits are hard to shake::> I know the sudo command as well, but thanks for the info.
For nt, I think I only have 2 keys in the manager, because I just recently started playing with encryption/Thunderbird/gnupg. I will post the info soon as possible, but can't do it as quickly as I'd like to. I routinely fly long distances with short notice and once I arrive at the customers place of business, I have to remain there till their instruments are functional again. It's high end analytical laboratory instruments, so the customers are wild with desire to get their machine back to operational status in a timely manner. Yesterday didn't go well and I plan on getting 5 hours of sleep before I return to the customers place of business. So, it's likely that I might not be able to try other suggested solutions until after the work is done. So, if I don't reply promptly, don't think I have given up or that I don't care::>
BTW my employer is interested in linux, they'd save millions++ of $$ if they convert to linux. They are just now considering buying new computers for everyone at the company. If they can delay the purchase of new computers because the old ones run Linux so well (less bloatware and no virus protection needed), they'll save millions!! And, they will not have to contract for support/bug fixes from brand W/MS....which saves big bucks too. If they decide to switch, I might have a Linux Czar title, which is a gigantic promotion I hope/think!!! Go Linux!!!!
I did poke around this forum a bit, and the content is exceptional....my thanks to all who maintain/manage this forum!!! I'm glad to be a member!
I think I only have 2 keys in the manager, because I just recently started playing with encryption/Thunderbird/gnupg. I will post the info soon as possible, but can't do it as quickly as I'd like to.
There's no rush. Just to let to you know, I expect the --list-secret-keys to only list a single key at most (unless you created some other private keys for testing).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.