LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-16-2017, 03:38 AM   #1
overwhelmednewbie
LQ Newbie
 
Registered: Sep 2017
Posts: 18

Rep: Reputation: Disabled
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.
 
Old 10-16-2017, 06:21 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,376

Rep: Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038Reputation: 3038
Quote:
Originally Posted by overwhelmednewbie View Post
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.
 
Old 10-16-2017, 06:53 AM   #3
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,542

Rep: Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839
Quote:
Originally Posted by overwhelmednewbie View Post
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?
The copy is already complete, just try it out!
 
Old 10-16-2017, 07:19 AM   #4
overwhelmednewbie
LQ Newbie
 
Registered: Sep 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
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.

Thanks to the both of you.

BB
 
Old 10-16-2017, 02:57 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,147
Blog Entries: 9

Rep: Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601
permission issue? files unreadable due to it?
tried the same with su/sudo?
 
Old 10-16-2017, 03:54 PM   #6
overwhelmednewbie
LQ Newbie
 
Registered: Sep 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
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.

Thanks to all who rendered assistance.

BB
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2017-10-16_15-40-20.png
Views:	22
Size:	123.1 KB
ID:	26118  
 
Old 10-17-2017, 02:26 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,147
Blog Entries: 9

Rep: Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601Reputation: 3601
back to post #1 - is there an actual problem?
upon closer inspection it seems to me that the 2 missing files are irrelevant.
 
Old 10-17-2017, 02:27 AM   #8
overwhelmednewbie
LQ Newbie
 
Registered: Sep 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
The eagle has landed.

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.

See screen capture.

BB
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2017-10-17_01-55-28.png
Views:	13
Size:	115.9 KB
ID:	26121  
 
Old 10-17-2017, 05:20 AM   #9
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,282

Rep: Reputation: Disabled
To copy folders use cp -a, using sudo, then change ownership to the user.
 
Old 10-17-2017, 08:38 AM   #10
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,542

Rep: Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839
Could you post the output of running
Code:
gpg --list-secret-keys
on each machine? The output will probably include your email address, you should replace it with **** before posting.
 
Old 10-18-2017, 05:37 AM   #11
overwhelmednewbie
LQ Newbie
 
Registered: Sep 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
Smile

Thanks to fat and nt.

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!

BB
 
Old 10-18-2017, 09:07 AM   #12
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,542

Rep: Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839
Quote:
Originally Posted by overwhelmednewbie View Post
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).
 
  


Reply

Tags
copy


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
can I copy .gnupg folder to a machine with different username/group? mtdew3q Linux - Server 3 01-28-2017 07:41 PM
Is it bad to just copy the entire phpmyadmin folder into the public directory? greenace92 Slackware 9 04-24-2016 02:25 AM
KGpg-versus terminal : how to backup the keys - with entire "~.gnupg/" directory sayhello_to_the_world Linux - Newbie 3 12-16-2013 06:10 AM
howto: copy files/folder(entire directory) from linux harddrive to ntfs formatted dri stevenvw Linux - Newbie 6 10-19-2012 07:57 PM
Copy an entire folder tree pshankland Linux - Newbie 3 09-28-2010 04:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration