You are not logged in.

#1 2014-06-21 19:00:21

Varg
Member
From: Belgium
Registered: 2010-07-07
Posts: 272

i3lock: cannot unlock

When using i3lock, every time I try to unlock I get the "wrong password" message. The only way to get out of i3lock is by switching to a tty and killing the process.

/etc/pam.d/i3lock:

$ cat /etc/pam.d/i3lock 
#
# PAM configuration file for the i3lock screen locker. By default, it includes
# the 'system-auth' configuration file (see /etc/pam.d/login)
#

auth include system-auth

I did not make any changes to /etc/pam.d/login or etc/pam.d/system-auth. After searching a bit, I've only found a similar problem on the forum about xscreensaver but that topic is unsolved and xscreensaver works fine for me.

Last edited by Varg (2014-06-21 19:33:01)

Offline

#2 2014-12-06 11:23:06

stibi
Member
Registered: 2006-10-10
Posts: 34

Re: i3lock: cannot unlock

Hi,
I have the same problem.
I can't find anything wrong with pam configuration, not sure what's causing this sad

Offline

#3 2015-01-05 11:08:15

stibi
Member
Registered: 2006-10-10
Posts: 34

Re: i3lock: cannot unlock

Hi again,
I think I've solved the problem at least for my case.
The problem is with $USER environmental variable.

i3lock gets the current user from there, to make a connection with PAM using the username and then authenticate against this username to unlock.
See what you get there:

    echo $USER

It should return your username, nothing else. I got this:

    $ echo $USER
    %{%{%}%}%n

This is something from zsh, oh-my-zsh, or my zsh theme, not sure yet, but that's really not my username smile

How to fix it:
* find out why I have that mess in the $USER and fix it
* export USER=yourusername && i3lock
* modify how i3lock resolves the current user (https://github.com/i3/i3lock/pull/3)

Hope it helps you.

Offline

#4 2015-01-05 16:17:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: i3lock: cannot unlock

stibi wrote:

How to fix it:

pacman -R oh-my-zsh

Fixed that for you...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-01-24 00:44:45

Badacadabra
Member
From: France
Registered: 2017-01-23
Posts: 1

Re: i3lock: cannot unlock

I spent a few hours investigating on this issue and the best solution I have found consists in setting extended permissions on /etc/shadow: sudo chmod +r /etc/shadow

It is probably not ideal in terms of security and a better solution could be to create a "shadow" group (instead of root) that would be used by third-party applications. I know Ubuntu uses this trick, but honestly I am not an expert in PAM configuration to reproduce this behavior in Arch...

Moreover, you can still use i3lock from a terminal using "sudo". The root user's password should always be recognized when you try to unlock.

Last edited by Badacadabra (2017-01-24 00:48:38)


"Science fiction does not remain fiction for long. And certainly not on the Internet." — Vinton Cerf

Offline

#6 2017-01-24 02:41:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,715

Re: i3lock: cannot unlock

Badacadabra, Welcome to the Arch Linux forums.   Thank you for the relevant contribution, but I am going to go ahead and close this two year old thread.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB