Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unlock keyring upon login

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Unlock keyring upon login

#1 Post by Scorpion »

I use nodm so I am auto-logged into my computers.
Some apps ask me to enter the password because:
Unlock Login Keyring
Authentication Required
The login keyring did not get unlocked when you logged into your computer.
Password:
That gtk dialog immediately nullify the output of the on-screen keyboard so I cannot unlock the keyring, and I have to log out to fix it.
(So I cannot unlock it without a physical keyboard).

How can I make the keyring unlock upon login?
Last edited by Scorpion on 2022-09-20 08:35, edited 2 times in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Unlock keyring upon log in

#2 Post by Head_on_a_Stick »

ArchWiki wrote:When using console-based login, edit /etc/pam.d/login:

Add 'auth optional pam_gnome_keyring.so' at the end of the auth section and 'session optional pam_gnome_keyring.so auto_start' at the end of the session section.

/etc/pam.d/login:

Code: Select all

#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
session    optional     pam_gnome_keyring.so auto_start
https://wiki.archlinux.org/title/GNOME/Keyring#PAM_step

And pay attention to the Tip in respect of autologin.

Disclaimer: I've never tried nodm.
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Unlock keyring upon log in

#3 Post by Scorpion »

It didn't work.

I restarted nodm do I need to reboot?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Unlock keyring upon log in

#4 Post by Head_on_a_Stick »

Why are you even asking that?

EDIT: have you autostarted the keyring daemons? See https://wiki.archlinux.org/title/GNOME/ ... XFCE,_...) for the details. Mutatis mutandis, obviously.
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Unlock keyring upon log in

#5 Post by Scorpion »

Tip
To use automatic unlocking with automatic login, you can set a blank password for the default keyring. Note that the contents of the keyring are stored unencrypted in this case.
I rebooted but didn't work, so do I need to blank the keyring for auto login?

I was trying to find a method without removing the password.
Last edited by Scorpion on 2022-09-20 07:56, edited 3 times in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Unlock keyring upon log in

#6 Post by Head_on_a_Stick »

Head_on_a_Stick wrote: 2022-09-18 19:53 have you autostarted the keyring daemons?
If the keyring daemon isn't running then PAM can't unlock it.
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Unlock keyring upon log in

#7 Post by Scorpion »

I can see it running I already have in /etc/xdg/autostart:

Code: Select all

gnome-keyring-pkcs11.desktop
gnome-keyring-secrets.desktop
gnome-keyring-ssh.desktop

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Unlock keyring upon log in

#8 Post by Head_on_a_Stick »

Scorpion wrote: 2022-09-19 18:05 I can see it running
How can you see it running?
Scorpion wrote: 2022-09-19 18:05I already have in /etc/xdg/autostart:
Not all desktops use XDG autostart. Which desktop are you using?

EDIT: and in respect of the password I think you might have to disable autologin for this to work but I'm not sure 'cos I don't use the keyring or a display manager.
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Unlock keyring upon log in

#9 Post by Scorpion »

I see it on the system-monitor app that I use.

XDG autostart works here, openbox with the recommends package installed (default behavior).
I never set the keyring to exist vorta wanted me to have one.
And nheko asks for it.

You don't use keyring because did you blank the password?

My goal is to unlock the keyring for auto login, it seems that you have to remove the password as you said, hence you should have LUKS,

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Unlock keyring upon log in

#10 Post by Head_on_a_Stick »

Scorpion wrote: 2022-09-20 07:55 You don't use keyring because did you blank the password?
I don't use the keyring. I've never understood what it's for, exactly. I know if I enable autologin in GDM/GNOME I get a password prompt once at the desktop, which is really ****** annoying. That's why I don't use GNOME any more. Now that the keyring isn't running I don't get password prompts after autologin and everything works just fine. Seems to me that the keyring is just useless bloat but I must be wrong, right?

Anyway, all I had to offer was the ArchWiki link (as usual). Sorry.
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Unlock keyring upon login

#11 Post by Scorpion »

I am on openbox and I never installed GNOME or other DEs.

The file "/etc/xdg/autostart/gnome-keyring-secrets.desktop" has "OnlyShowIn=GNOME;Unity;MATE;".
And also the other gnome-keyring*, but I can see its command in the gnome-keyring process:

Code: Select all

/usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
Furthermore I copied the gnome-keyring entries in my home (that nullify the system ones) and I added "Hidden=true".

Post Reply