Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having trouble with my screen freezing, and I think it may be due to the login keyring. Right now, it's asking for a new keyring (I deleted the old one), but the screen is unresponsive. The only way I can access anything is through a root shell at startup.

How can I set the keyring from the command prompt?

share|improve this question
possible duplicate… – Raja Sep 11 '12 at 14:35
@August, I don't want to login via the command line, I want to change the password via the command line, which I'm hoping is stored in a config file somewhere? (the only way I can access the system right now is by dropping into a root shell prompt). – Brian Dant Sep 11 '12 at 14:47
Possible alternative/workaround… – WurmD Sep 18 '12 at 8:00

After much trial and error I found that the old feisty package pam-keyring still contains the pam-keyring-tool which you can use to unlock keyrings from the command line. Ubuntu took the tool out of the package after the feisty release, perhaps for security reasons?

Here's what to do:

  1. Download the package:

  2. Unpack it where you want, then do:


    You DON'T make install because you don't want it to upgrade the package at any point.

  3. Open the post login config file rc.local:

    gksu gedit /etc/rc.local
  4. Edit to make it look like this:

    exec echo ENTER_YOUR_PASSWORD_HERE | /PATH_TO_PAM_KEYRING_TOOL/pam-keyring-tool --keyring=login -u -s
    exit 0

That's it! This definitely works.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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