4

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?

  • possible duplicate http://askubuntu.com/questions/18927/how-to-enter-the-default-keyring-password-via-the-command-line – Raja G Sep 11 '12 at 14:35
  • 2
    @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 http://askubuntu.com/questions/78344/how-to-completely-reset-erase-the-keyring?rq=1 – WurmD Sep 18 '12 at 08:00

1 Answers1

2

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:

    wget https://launchpad.net/ubuntu/+archive/primary/+files/pam-keyring_0.0.8.orig.tar.gz
    
  2. Unpack it where you want, then do:

    ./configure
    
    make
    

    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.

Peachy
  • 7,117
  • 10
  • 38
  • 46