2

I am try to prepare a backup of my Ubuntu 18.04 including the Seahorse Keyrings. For that I use rsync to copy the content of /home/user/.local/share/keyrings/ to my NAS.

Then I copy this data to a second computer with Ubuntu 18.04 but Seahorse ignores the passwords containing *.keyring-files. If I manually try to import them Seahorse output this error message:

<file>.keyring
Could not display "<file>.keyring"
Reason: Unrecognised or supported data. 

It seems like en encryption problem as described here. But decryption of especially the keyrings is not an option.

What is the appropriate way to restore backup keyrings or transfer them to an other computer?

0

I found this post where @dobey pointed out that the keyring seahorse-daemon/service must not run throughout the keyring data will be overwritten.

In order to that I did this steps:

  1. Turn on the target computer but not log in or log out.

  2. Use an other computer to log in to my NAS using ssh. Then changing to the backup folder:

    user@nas:~$ cd <path to backup>
    
  3. Copy the keyring data to the target computer using scp:

    user@nas:<path to backup>$ scp -r home/user/.local/share/keyrings/ <user>@<target ip>:.local/share/
    
  4. Login at the target computer. Open Seahorse/keyrings. The copied keyrings shall be listed now (or updated).
    Sitenote Something I recognised first within my tests: Seahorse keyrings are password protected and they keep the password from the origin computer. In my case it was the same as the user login. It may a good idea from now to use a different one ;).

The unfavourable part at this way is, that it needs a second computer or a computer with at least two accounts. But in case that only one computer is available, it may work with temporally turn of the keyring deamon:

  1. Search how the service is spelled correctly and get the PID:

    user:~$ ps -u user | grep seahorse
    user:~$ ps -u user | grep keyring
     1234 ?        00:00:00 gnome-keyring-d
    
  2. Stop the service by killing the process using the PID from above (1234):

    kill 1234
    
  3. Copy the keyring data as described above (or on a way you prefer more).

  4. Start the service:

    user:~$ /usr/bin/gnome-keyring-daemon --daemonize
    SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
    

The approach with service gnome-keyring-daemon stop|start results in this error: Failed to stop gnome-keyring-daemon.service: Unit gnome-keyring-daemon.service not loaded. That's why I choose the way above. You may provide a correct way to handle this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.