I am on Ubuntu and I have forgotten the password for my Gnome Keyring (yes, stupid me, I know). Any way I can get it back? I have already looked at this link, but it says it's not possible if my home directory is encrypted and unfortunately my home directory is encrypted.


Resetting everything (delete all passwords and start new keyring):

rm ~/.local/share/keyrings/login.keyring


Navigate to Places > Home. Press Ctrl + H to view "hidden files". Navigate to .local > share > keyrings and delete login.keyring

Using the same keyring (resetting keyring password but keeping old passwords in keyring):

  1. Make a backup of the keyring

    cd ~/.local/share/keyrings/
    cp login.keyring login.keyring.backup

    and after that delete login.keyring file

    rm ~/.local/share/keyrings/login.keyring
  2. Create a new keyring file from Gnome Keyring with the name login

  3. Replace the new keyring file with the backup of the old keyring file

    cd ~/.local/share/keyrings/
    mv login.keyring.backup login.keyring      

Note: before Ubuntu 12.10 the path to the keyrings folder was ~/.gnome2/keyrings/ instead of ~/.local/share/keyrings/.

| improve this answer | |
  • 5
    how to do step 2? – xor Feb 27 '15 at 13:04
  • 1
    I thought it was a bit simple, it hasn't worked for me. It still says my password is wrong – Madivad Apr 23 '16 at 22:16
  • 10
    I wonder why (and how) resetting the keyring password while keeping old passwords should work. And indeed it doesn't work for me (it says "The unlock password was incorrect") – Scz Aug 15 '16 at 8:12
  • 7
    Indeed, "resetting keyring password but keeping old passwords in keyring" sounds absurd. – Alexey Aug 26 '16 at 12:52
  • 1
    I thought step 2 meant run seahorse, click on "File" in top menu and choose new, then select "Password Keyring", hit continue and enter for name "login". – eshaya May 3 '17 at 19:39
  1. Start up Ubuntu's Dash (top most icon in Unity or press Super)
  2. Type Pass to get Passwords and Keys and start this (this will start the Gnome Keyring frontend seahorse)
  3. Next
    • If the password is known: Under Passwords the default folder select unlock, or
    • If the password is not known: right mouse click and delete for resetting.

Next time Ubuntu will ask for a new password for the keyring.

| improve this answer | |
  • 1
    Thanks! (Or type seahorse directly.) – caw Jun 11 '17 at 23:08
  • Right clicking and then clicking Change Password works. – Haggra Dec 30 '19 at 23:45

Solved this by installing seahorse frontend.

| improve this answer | |
  • 4
    Note this is installed by default on Ubuntu installs. – Seanny123 Sep 3 '14 at 14:39
  • 3
    @Seanny123 not installed by default on Xubuntu, at least.. probably also not on kubuntu/lubuntu/etc. – fatal_error Dec 11 '16 at 17:50

The answer for removing the specific file for rm ~/.local/share/keyrings/login.keyring does not work on all forms of Ubuntu.

One should open up the file manager and show hidden files (CTRL + H). Then one should see .local/share/keyrings delete all of the files in this directory and you should be good to go.


| improve this answer | |

I'm on Ubuntu MATE 16.04 and deleting files in ~/.local/share/keyrings/ didn't help me. What helped though is running seahorse and changing login password. I entered my current password and typed the same as new one. Then I logged out and logged is and my login password became password for Gnome2 Key Storage.

enter image description here

| improve this answer | |

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