Sunday, August 09, 2009

Make Fedora 11 unlock your Gnome keyring automatically upon login.

I love Fedora 11, it's so clean and doesn't have the crushing Intel graphics driver bugs present in Ubuntu 9.04. However one bug/feature that is really annoying is that you are made to unlock the Gnome keyring manually whenever an application attempts to access your keyring for stored credentials.
For instance if your network connection is a wireless connection using WEP/WPA encryption, the Network Manager application cannot connect after you login until you've typed in your Gnome keyring password, most annoying.

It is possible to make your Gnome keyring unlock automagically after login using the tool pam-keyring-tool.

Firstly it's often recommended that you delete your current keyrings. I don't think this is necessary as such but if you find this solution doesn't work then delete the keyrings in a terminal as follows;
 rm -f ~/.gnome2/keyrings/*  

Then in your Gnome desktop browse to System > Preferences > Startup Applications.
Select the [Add] button.
Enter the name as something meaningful such as GNOME Keyring Unlock
Enter the following in the command field;
 cat ~/.keypass | /usr/libexec/pam-keyring-tool --unlock --keyring=default -s  

Then select the [Add] button.

Finally you'll need to put your account's password in a file in your home directory..

 echo "yourpassword" > ~/.keypass  

...and set some secure permissions on the file...
 chmod 400 ~/.keypass  

Finished.

Now logout and log back in, you'll no longer be nagged to unlock your keyring.
If you deleted your default keyring file earlier, you'll have to re-enter your previously stored passwords and keys (such as your WEP/WPA key) when prompted.

No comments:

Post a Comment