Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swaylock fails to unlock #3631

Closed
J0nnyMak0 opened this issue Feb 9, 2019 · 11 comments
Closed

swaylock fails to unlock #3631

J0nnyMak0 opened this issue Feb 9, 2019 · 11 comments

Comments

@J0nnyMak0
Copy link
Contributor

sway version 1.0-rc1-37-gf5190d1f (Feb  9 2019, branch 'master')

I lock with the following command:

swayidle timeout 30 'swaylock -c 000000' timeout 60 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -c 000000'

After typing in my password (correctly), swaylock informs me my password is wrong and keeps screen locked.

sway.log

@emersion
Copy link
Member

emersion commented Feb 9, 2019

Have you installed /etc/pam.d/swaylock? Can you run swaylock -d >swaylock.log 2>&1?

@J0nnyMak0
Copy link
Contributor Author

Have you installed /etc/pam.d/swaylock? Can you run swaylock -d >swaylock.log 2>&1?

2019-02-09 02:33:43 - [main.c:1057] Parsing CLI Args
2019-02-09 02:33:43 - [main.c:271] output name is eDP-1
2019-02-09 02:33:49 - [pam.c:102] pam_authenticate failed: invalid credentials
2019-02-09 02:33:57 - [pam.c:102] pam_authenticate failed: invalid credentials

I installed swaylock from source, but don't find swaylock in /etc/pam.d/. Probably a recent change?

@RyanDwyer
Copy link
Member

This is new behaviour in Arch's pambase package which was updated recently. It requires /etc/pam.d/swaylock to exist with this content:

auth include login

The file already exists in the swaylock repo and Meson is configured to install it.

@emersion
Copy link
Member

emersion commented Feb 9, 2019

Is it installed in /usr/local/etc/pam.d?

@J0nnyMak0
Copy link
Contributor Author

J0nnyMak0 commented Feb 9, 2019

Is it installed in /usr/local/etc/pam.d?

Bing. Ok, I'll set meson --prefix thanks!

@delwiv
Copy link

delwiv commented May 18, 2019

Can you please precise what prefix to use ? I'm having the very same issue, many thanks !

Edit : using /usr as prefix, I have /etc/pam.d/swaylock containing auth include login, but still cannot unlock : pam_authenticate failed: invalid credentials

@stacyharper
Copy link
Contributor

Hello ! I'm having the exact same issue on voidlinux musl. The /etc/pam.d/sway contains the "auth include login"
Is there something else to do?

@eternal-sorrow
Copy link

I'm having the same issue right now. /etc/pam.d/swaylock is in place

@Michael-Jing
Copy link

Michael-Jing commented Nov 20, 2021

I'm facing this issue now. The logs are:
2021-11-20 10:28:02 - [swaylock-1.5/main.c:1147] Parsing CLI Args
2021-11-20 10:28:02 - [swaylock-1.5/main.c:280] output name is DP-2
2021-11-20 10:28:02 - [swaylock-1.5/main.c:280] output name is HDMI-A-1
2021-11-20 10:28:02 - [swaylock-1.5/main.c:280] output name is eDP-1
2021-11-20 10:28:10 - [swaylock-1.5/pam.c:101] pam_authenticate failed: unknown error (6)
2021-11-20 10:28:17 - [swaylock-1.5/pam.c:101] pam_authenticate failed: unknown error (6)

It seems that this start to happen after I created a btrfs subvolume @, copied files from root subvolume / into @, and started to mount @ as the system root filesystem (in order to setup timeshift backup)

It turns out that some of the file permissions got missed up during the copy, fixed by chmod 6755 /sbin/unix_chkpwd, based on the suggestions on this page

@jm355
Copy link

jm355 commented Jan 23, 2024

Just chiming in here to say I ran into a similar issue where swaylock wouldn't unlock saying "User has an invalid shell '/usr/bin/dash'". Turned out, /etc/shells didn't have /usr/bin/dash but it did have /bin/dash, so I did sudo chsh -s /bin/dash <user> for all the users that were using /usr/bin/dash according to /etc/passwd, and that seemed to fix it

@carbolymer
Copy link

carbolymer commented May 22, 2024

Same for me, swaylock never unlocks. On Archlinux:

$ swaylock -F -d
2024-05-22 11:03:48 - [swaylock-1.7.2/main.c:1211] Parsing CLI Args
2024-05-22 11:03:48 - [swaylock-1.7.2/main.c:1268] Using ext-session-lock-v1
2024-05-22 11:03:48 - [swaylock-1.7.2/pam.c:88] Prepared to authorize user mgalazyn
2024-05-22 11:03:51 - [swaylock-1.7.2/comm.c:22] received pw check request
$ 

I need to pkill --signal SIGUSR1 swaylock to get back access to desktop.

EDIT: seemes that was an issue with my fprint configuration: hyprwm/hyprlock#340 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants