You are not logged in.
When running swaylock on Arch Linux, I encounter an authentication failure with the following error:
2025-09-27 19:48:22 - [swaylock/pam.c:110] pam_authenticate failed: authentication information unavailable
Additionally, running pamtester swaylock <username> authenticate returns:
pamtester: Authentication service cannot retrieve authentication info
An strace of swaylock reveals the root cause as a permission issue:
openat(AT_FDCWD, "/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
The permissions of /etc/shadow are:
-rw-r----- 1 root root 1310 Jul 26 20:02 /etc/shadow
System Details
OS: Arch Linux
Kernel: 6.16.8-arch1-1
Swaylock Version: v1.8.3 (" DATE ", branch 'makepkg')
PAM Version: 1.7.1-1
Sway Version: 1.11
PAM Configuration
/etc/pam.d/swaylock:
#%PAM-1.0
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
/etc/pam.d/system-auth:
#%PAM-1.0
auth required pam_faillock.so preauth
# Optionally use requisite above if you do not want to prompt for the password
# on locked accounts.
-auth [success=2 default=ignore] pam_systemd_home.so
auth [success=1 default=bad] pam_unix.so try_first_pass nullok
auth [default=die] pam_faillock.so authfail
auth optional pam_permit.so
auth required pam_env.so
auth required pam_faillock.so authsucc
# If you drop the above call to pam_faillock.so the lock will be done also
# on non-consecutive authentication failures.
-account [success=1 default=ignore] pam_systemd_home.so
account required pam_unix.so
account optional pam_permit.so
account required pam_time.so
-password [success=1 default=ignore] pam_systemd_home.so
password required pam_unix.so try_first_pass nullok shadow
password optional pam_permit.so
-session optional pam_systemd_home.so
session required pam_limits.so
session required pam_unix.so
session optional pam_permit.so
Expected Behavior
pamtester swaylock authenticate should successfully authenticate with the correct password.
swaylock should display the lock screen and unlock upon entering the correct password.
Actual Behavior
Authentication fails with the errors described above, preventing swaylock from functioning.
I have tried to open issue on github, but they ghosted me.
Offline