I have figured it out ! Here is a little explanation on how I achieved it:
First, copy the sddm-autologin
into /etc/pam.d
to override it:
sudo cp /usr/lib/pam.d/sddm-autologin /etc/pam.d
Once copied, open t e file sudo vim /etc/pam.d/sddm-autologin
and modify it so it looks like this (this is a diff, do not add the +):
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_permit.so
+auth optional pam_systemd_loadkey.so
+auth optional pam_kwallet5.so
account substack common-account
account include postlogin-account
password substack common-password
password include postlogin-password
session required pam_loginuid.so
session optional pam_keyinit.so revoke force
session substack common-session
session include postlogin-session
Once done, the display-manager.service
must be altered to allow accessibg the keyring : (on my system, display-manager.service
is directly sddm.service
, I do not know how it works when there is the bash script wrapper by default):
systemctl edit display-manager.service
In the override part, add:
[Service]
KeyringMode=inherit
That should do the trick ! No package has to be installed, everything is present on the default setup. Note: on my system, the auto_start
flag was not required on the common-session, so I did not use pam-config
at all.
I feel like it would be a truly great addition to have this by default in terms of UX for coming users that uses FDE with autologin (fedora do indeed activate this by default), it is a setup that happens to be almost the default one when installing openSUSE (I’ve made almost no customization of the default setup).