Aditya Bose

Software developer and part-time memelord

Reset Forgotten Login Keyring In Ubuntu

If you’ve ever changed your Ubuntu login password, you should also change your keyring password. If you don’t do it, it might display the following dialog when you do certain things on your system like connecting to wireless, starting up your browser, etc.

Unlock Login Keyring

Ever since I installed Chrome a few weeks ago, and saved the login passwords of some sites, I’ve been seeing this popup on my screen whenever I open Chrome. The popup disappears though, after clicking on Cancel several times. Since I mostly use Firefox to browse the Internet which does not have such a problem, I kept on procrastinating fixing the issue. This week, I finally decided to investigate the reason why this might be happening, and document the steps I took to fix it.

The popup to unlock the login keyring appears in Chrome because it uses the Gnome keyring to save all the login and password for websites.

The easiest way to reset the login keyring is by going to the keyrings directory in the .local inside your home directory, and removing the login.keyring. You can do it from the console like so:

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

This would reset everything including your keyring password and all passwords for websites saved on Chrome, and you can create a new keyring

If you want to only reset the keyring password, but keep the old passwords saved in the keyring, you need to first make a backup of the keyring like shown below:

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

Then, delete the login.keyring file by running:

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

Then, create a new keyring file from Gnome Keyring with the name login.

Finally, replace the new keyring file with the backup of the old keyring file.

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

That’s it! This will solve the problem of the login keyring unlock popup appearing because of the Ubuntu login and keyring login password mismatch.

If you want to read more, there is a popular question on Ask Ubuntu which has been answered by several people.

See you again in another one!