Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 askubuntu.com/questions/18927/… –  raaz Sep 11 '12 at 14:35
1  
@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 askubuntu.com/questions/78344/… –  Dario WurmD Sep 18 '12 at 8:00
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

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.