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 never accepts the correct password #2773

Closed
johnae opened this issue Oct 6, 2018 · 7 comments
Closed

Swaylock never accepts the correct password #2773

johnae opened this issue Oct 6, 2018 · 7 comments

Comments

@johnae
Copy link
Contributor

johnae commented Oct 6, 2018

While this issue may be related to #2743 I have a feeling it's not the same issue.

My password is never accepted by swaylock (not just sometimes). It seems to be because I have a capital letter in my password and so I need to use the shift key to enter it. When I press shift, the indicator reacts to it by becoming the same green color all over, so it seems to do "something" when I just press shift.

This happens regardless of whether I run swaylock through swayidle or just directly from the command line like swaylock -c 000000.

@johnae
Copy link
Contributor Author

johnae commented Oct 6, 2018

Using sway at commit 5d21c33 (tip of master atm).

@martinetd
Copy link
Member

Everyone™ have capital letters in their password, and it works for me ; you'll have to do some debugging (the ring is cleared when shift is pressed, as you describe)

If you don't mind dispaying your password, a simple thing to try would be to make swaylock just print your password to stdout before trying to unlock, then run swaylock manually from a term, enter password once, switch tty to kill swaylock then go back to the terminal to see what was printed

@ddevault
Copy link
Contributor

ddevault commented Oct 6, 2018

What OS are you using?

@johnae
Copy link
Contributor Author

johnae commented Oct 6, 2018

@martinetd Did as you suggested and debugged swaylock - it does get the correct password, which lead me to look elsewhere and ofc it's all my fault - bad/missing pam config. I've been running sway directly from a clone without ever thinking of pam. @SirCmpwn I'm running NixOS. So the fix in my case was really simple - in /etc/nixos/configuration.nix:

security.pam.services.swaylock = {
    text = ''
      auth include login
    '';
  };

Then rebuild the os conf.

@johnae johnae closed this as completed Oct 6, 2018
@colemickens
Copy link
Contributor

colemickens commented Oct 6, 2018

@johnae just a heads up, there is a program wrapper for sway. I have a slimmed down version I'm using successfully with the latest commits as well: https://github.com/colemickens/nixpkgs/blob/3a7df52cf34cad742a943b4eb0644db8d0aa47a4/nixos/modules/programs/sway.nix (the sway/wlroots/meson packages are in sway-wip branch).

It has a more minimal pam config than you have here, but it seems to work for me.

@johnae
Copy link
Contributor Author

johnae commented Oct 6, 2018

Thanks @colemickens that's very useful.

@NilsIrl
Copy link
Contributor

NilsIrl commented Aug 23, 2019

@colemickens is this in nixpkgs now?

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

5 participants