Reset GNOME Keyring Password on Ubuntu

By | 2010/01/16

Reset GNOME Keyring Password on Ubuntu

This post is an update to an article I wrote some years ago. There have been some changes in the configuration between now and then, so I felt this warranted an update. The original article in question is: Clearing or Resetting the GNOME keyring. This article addresses the issue where a user may have forgotten or otherwise become locked out of their keyring. The keyring, of course, allows for the management of SSH, GPG and other keys through a central tool and interface.

The problem

You are prompted by the system to enter your keyring passphrase in order to unlock additional keys. None of your passphrases work–somehow you have become locked out of your keyring. In this situation you may not be able to unlock needed keys, such as passwords, SSH or GPG keys.

The solution

The only solution that I’ve been able to come up with is to delete the keyring contents, including the incorrect or corrupt passphrase. Note: this will destroy all stored keys in the keyring, requiring that they be re-imported. Other than the need to “start over” with the keyring manager, this solution should be otherwise harmless.

Method 1:

It is possible to clobber your keyring passphrase and settings from the Terminal. Open a terminal (Applications > Accessories > Terminal), and run the command:

rm ~/.gnome2/keyrings/login.keyring

On older systems you may need to try:

rm ~/.gnome2/keyrings/default.keyring

Method 2:

The second method bypasses the Terminal and uses the graphical interface strictly. To delete your current keyring, follow the steps below:

  1. Navigate to Applications > Accessories > Passwords and Encryption Keys
  2. Select the far-right tab “Passwords”
  3. Select your keyring
  4. Right-click and attempt “Change Password” or, if that doesn’t work, select “Delete”

Additional:

If you continue to have problems I would suggest looking for additional tips in the comments here or here.

11 thoughts on “Reset GNOME Keyring Password on Ubuntu

  1. Lyle

    Thanks for your post it came in handy while I was helping my nephew with his Ubuntu computer. He had changed his login password then forgot it. After I walked him through resetting his login he could not log into Keyring.

  2. Irene

    Thank you, thank you. I spent hours looking in the forums and reset the password in root, which didn’t clear the problem. Finally ended up here and in 1 min it was solved. I just wasn’t game to totally delete the password keyring.

  3. Gurtej Kanwar

    Just thought I should add, what happend to me was that I changed my login password, so then every time I logged in, it said that the keyring password and login password didn’t match, so I had to type it in each time, which was pretty annoying. In this case, you can go to Applications > Accessories > Passwords and Encryption Keys > Passwords tab, then Right Click on the keyring that is the problem and click Change Password. It asks you for the old password and then what you want to change it to. Obviously, this only works if you actually know the old password, but I still thought I’d mention it here.

  4. Dominik

    Thanks a lot! I had to delete my existing keyring and define a new one.

    Afterwards it worked 🙂

  5. Steve

    Thanks for the post, really helped me out!

  6. anant saraswat

    thanks…..for method1 , it works

  7. ray

    Dominik :Thanks a lot! I had to delete my existing keyring and define a new one.
    Afterwards it worked

  8. Rohan

    Hey it’s not working..i am tried this command but, it prompt me with the message “cannot delete the directory, it is not present.” please tell me what should i do…Thank You.

    1. hkh

      hey rohan dont open terminal from desktop open it from accessories try it…

Comments are closed.