Auto Unlock Keyring in Ubuntu Intrepid: Fix
To auto-unlock the GNOME Keyring in Ubuntu Intrepid (8.10), you need to set an empty password on the keyring itself, or use a workaround involving the login keyring and automatic login. The default keyring is encrypted with your login password, so it locks when you log out; setting a blank password removes the prompt but also removes encryption.
Background: Why the Keyring Locks
The GNOME Keyring is a service that stores passwords, SSH keys, and other secrets. In Ubuntu Intrepid, the default keyring (named “login”) is tied to your user account password. When you log in, the keyring is unlocked using that password. If you use automatic login, or if you change your password without updating the keyring, the keyring cannot be unlocked automatically and you get a popup asking for the keyring password.
This is a security feature: it prevents programs from accessing stored credentials without your consent. But for a single-user home machine, the prompt can be annoying, especially after every reboot.
How the Login Keyring Works
When you first log in, the keyring daemon (gnome-keyring-daemon) tries to unlock the “login” keyring using the password you entered at the GDM login screen. If that password matches the keyring password, the keyring unlocks silently. If it doesn’t match (for example, because you used automatic login or changed your password), you see a prompt.
In Intrepid, the keyring password is stored in a file called ~/.gnome2/keyrings/login.keyring (the actual encryption key is derived from your password). The daemon compares the hash of your login password with the hash stored in the keyring. If they match, it unlocks.
There is no built-in setting to “always auto-unlock” without either matching passwords or an empty keyring password. The only official way to avoid the prompt is to make the keyring password empty.
Method 1: Set an Empty Keyring Password
This is the simplest and most reliable method. It removes the encryption on the keyring, so any program can read stored passwords without asking. Do this only if you understand the security trade-off.
- Open a terminal (Applications > Accessories > Terminal).
- Run
gnome-keyring-manager(orseahorseif you have it installed). - Right-click on the “login” keyring and select “Change Password”.
- Enter your current password, then leave the new password fields empty.
- Confirm. The keyring will now have no password.
After this, the keyring is automatically unlocked at login because there is no password to check. You will never see the prompt again.
Method 2: Match Login Password with Keyring Password
If you don’t want to disable encryption, you can ensure the keyring password matches your account password. This works if you use normal login (not automatic).
- Open
gnome-keyring-manager. - Change the keyring password to your current login password.
- Log out and log back in. The keyring should unlock automatically.
If you change your account password later, you must update the keyring password again, or you’ll get the prompt.
Method 3: Use Automatic Login with a Blank Keyring
If you use automatic login (no password at GDM), the keyring cannot be unlocked because no password is provided. The only way to auto-unlock in that scenario is to set an empty keyring password, as in Method 1. There is no way to have automatic login and a password-protected keyring that unlocks itself.
Common Problems and Misconceptions
One common misconception is that removing the keyring password makes all your stored passwords visible to anyone. Actually, it means that any program running as your user can read them without a prompt. That is the same as being logged in, so it’s not a huge risk on a single-user machine, but it’s not zero.
Another issue: if you have multiple keyrings (e.g., “Default” and “login”), you need to change the password on the one that is being prompted. The prompt usually says which keyring it is asking for.
If you get a prompt after a system update, it may be because the keyring format changed. In that case, backing up and recreating the keyring can help.
Security Considerations
An empty keyring password means that any malicious software running in your session can silently steal all stored passwords (e.g., Wi-Fi passwords, website passwords saved in the browser). If you use a shared computer, do not do this. If you are the only user and you trust your system, it’s a reasonable convenience.
Also note that some applications (like Chrome) have their own password storage and are not affected by the keyring. The keyring mainly affects GNOME applications, Wi-Fi, and SSH.
Alternatives to Auto-Unlock
If you don’t want to disable encryption, you can:
- Use a separate keyring for less sensitive items and keep the login keyring protected.
- Use the “Unlock keyring when logging in” option if you use a smartcard or other PAM module (not common in Intrepid).
- Simply click “Unlock” every time the prompt appears – it’s only once per session.
Frequently Asked Questions
Will setting an empty keyring password affect my Wi-Fi passwords?
No, it will not delete them. They remain stored, but they will be accessible without a prompt. If you later set a new password, the same stored passwords will still be there.
How do I reset the keyring if I forgot the password?
Delete the file ~/.gnome2/keyrings/login.keyring (and any other keyring files in that directory). On next login, a new keyring will be created with your login password. You will lose all stored passwords.
Does this work on later Ubuntu versions?
The same principle applies to newer versions, but the keyring manager tool may be called seahorse instead of gnome-keyring-manager. The steps are similar.
Why does the prompt appear only sometimes?
It appears when the keyring is locked and an application tries to access it. If you haven’t unlocked it after login, the first request triggers the prompt. If you unlock it once, it stays unlocked until you log out.
Is there a way to auto-unlock with a password stored in a file?
Not officially. You could write a script that runs at login and uses gnome-keyring-daemon --unlock with the password, but that would require storing the password in plain text, which is less secure than an empty keyring.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.