How to configure pam_autologin

Hello everybody!

I am trying to configure pam_autologin following the instructions from the archwiki page but it doesn’t work.
I am using KDE Plasma as desktop environment and SDDM as login manager. Autologin is disabled.
I would like to use that because as I understood it’s the only way to get autologin working with an encrypted kwallet (leaving the password empty doesn’t seem much secure) which gets decrypted automatically on startup.

What I did:

  • installed pam_autologin from AUR
  • added the line auth required pam_autologin.so just under the line #%PAM-1.0 in the file /etc/pam.d/sddm
  • sudo touch /etc/security/autologin.conf
  • reboot

Now, as the archwiki page says, it should appear a message which tells that the next login will be saved but I don’t see any message (I am using plymouth, don’t know if it hides it). When the computer boots I enter the credentials in SDDM but it freezes and I cannot login.

I am a newbie but as I understand I followed precisely what the arch wiki says. I don’t have any clue on what to do, would be happy if anyone know. Thanks in advance!

The wiki article states that you should add the autologin line to /etc/pam.d/login, not to etc/pam.d/sddm.

If the login process is run by a PAM-based application, such as a display manager…then no further configuration is needed.

So, remove the line you added to etc/pam.d/sddm, and add it to /etc/pam.d/login instead.

Then reboot, open a TTY (CTRL + F3), and login. You should get a message that your next login will be saved. This means your next login to a TTY, not your login through SDDM.

This is to autologin to a TTY. If you want to autologin to your desktop using SDDM, that can be enabled through System Settings > Startup and Shutdown > Behavior.

I have never used an encrypted wallet, and I don’t have the time to research that for you, so I cannot advise you about anything on that.

1 Like

Thank you for your time.

I did as you said and the autologin works through the TTY.
I misinterpreted the wiki article and the package purpose.

At this point I don’t know if I could get what I thought (automatic unlocking of kwallet even if secured by password when autologin is enabled) so I will enable autologin through KDE settings and set a blank password for kwallet

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.