Jul
12
This post is in part an update to my previous post on resetting the gnome keyring, and partly due to my continued laziness, efficiency push. I want my machine to do everything for me anymore. The less tedious work I have to do the more actual work I can get done, right? This post will walk you through setting up your machine to auto-authenticate the gnome-keyring at login. One less password you have to enter when you login to your machine.
Installing the Package
We’ll need one tiny package for this to be supported. Using your favorite package manager install libpam-keyring, or use the following command:
sudo aptitude install libpam-keyring
Configuring PAM
Once this is installed we need to add a few lines to a configuration file. Follow this next step carefully. If you put the line in the wrong place it may cause problems with other parts of machine authentication.
Edit the /etc/pam.d/gdm file and append the following line to the end of the file:
@include common-pamkeyring
At this point the gnome-keyring will be handed your login password and, if they are the same, will be authenticated at login. If your login password and gnome-keyring password are different this will not work. Options? Set the passwords to match by first resetting the gnome-keyring password (this will wipe any saved keyring data) or come up with a solution that will authenticate one with the other, even if they are not the same. The latter solution I would be interested in, but am not aware of.
Thanks to Thad for the origins of this post, although slightly different between FC6 and Feisty.
If this site has been useful, please consider participating in the Fundraiser.
Other Points of Interest
Comments
22 Responses to “Automatically Unlocking the Default Gnome-Keyring : PAM Keyring”
Leave a Comment
Does this also work around the highly annoying network-manager keyring “feature”? I’d still rather start internet connection from laptop to my home router far before I log in, but this would at least be a step in the right direction!
jldugger - this does just that thing. Anything saved to your default keyring (which includes the NetworkManager) will be unlocked by your login password.
If you have a keyring password that’s different to your login password, you can create a script to authenticate your app.
For example, this is how I startup gajim on login:
echo “password” | /usr/lib/libpam-keyring/pam-keyring-tool -u -s; gajim &
Wtf, why this isn’t installed by default?!!? Insane.
However what happens when you change your login password? I assume that this doesn’t also update the keyring password as well, so as soon as one change their password, PAM-keyring won’t be able to authernicate anymore…
This is gonna get annoying for those that change their password regularly…
If it’s not already submitted as a bug - it’ll be ideal for Ubuntu if that the keyring could be linked to login password?
Cheers
JGJones - It doesn’t automagically update the keyring password when you change your login password (some people prefer to have them different), but you can update your keyring password manually by visiting System > Admin > Keyring Manager.
Great article! Just what I’ve been looking for. It works great except when combined with automatic login. When automatic login is enabled the keyring manager asks for the damn password. Does anyone know why and how to get it working?
Here is a workaround I found: http://ubuntuforums.org/showthread.php?t=192281&highlight=keyring+auto+login&page=7#postcount2524785
Just in case anyone’s interested.
“you can update your keyring password manually by visiting System > Admin > Keyring Manager”
and then what?
I cannot figure how to change the darn password
to reset the default keyring password, open system->keyring manager select view->keyrings and delete the default keyring, the next time u start a session, u will be prompted for a new password. note … this deletes all your keys on the keyring
I did this (or something like this) a while ago, however it does not appear to work if automatic login is enabled… which is two extra things to type in, username and password and I want to get from turning the computer on to being on the desktop, with internet (requires keyring) in the shortest possible time.
[...] ????????? ?????? ??? ?????? [...]
[...] Gnome Keyring nuisance has an [...]
any luck for those with automatic login?
I ve got the same problem…
Argh. I did this on Gutsy and now I am getting “Authentication Failed” with an OK button and no way of logging in at all. Help me please!
@Mike - if you’re not able to login at the graphical login you should be able to do “ctrl-alt-f1″ to get a virtual console. You can try reverting your changes from the shell and see if that resolves your problem.
this should definitely be included as default… it’s the same level of security, just invisible to the end user.
Hi - I have been looking for a solution for this since I installed Gutsy (my first linux installation) and this does not seem to work on this.
I think gutsy uses a different version and that libpam is not part of gutsy??
sorry not sure!! (bit of a newbie)
Is there any chance of an uodate to this post.
Believe me I have tried loads of variations and searched all the forums. I tried the script solution, the wi fi radar solution, etc etc!
Driving me insane!! heelelllppp!!
I do not reset my keyring password. I do not have the file. So I restarted the computer and now I can not login to Ubuntu gusty. (Authentication Failed) How can I revert back this package. Thanks
i am having the same problem (Authentication Failed), no idea what to type in after ctrl +alt + f1, could someone post the code to get back into ubuntu?
To revert back, login using another terminal with the keys Ctrl+Alt+F1.
When logged in, type ’sudo nano /etc/pam.d/gdm’ and edit the gdm file. Remove the line you added following this tutorial.
Press Ctrl+Alt+F7 to get back to the login screen. Press “Ok” in the weird dialog and login as usual, everything should be back to normal.
Thank god there was a solution to this problem.
Got the same problem as phil, but this fixed it.
Next time I’ll think twice before changing passwords…