linuxmint / cinnamon-screensaver

The Cinnamon screen locker and screensaver program
GNU General Public License v2.0
151 stars 86 forks source link

Cannot unlock cinnamon-screensaver #110

Open gustauperez opened 8 years ago

gustauperez commented 8 years ago

This is with FreeBSD 11, cinnamon 2.6.13 and cinnamon-screensaver 2.6.4, but perhaps it has always happened with all 2.6.x cinnamon-screensaver versions.

When the screensaver kicks in, any password is rejected. Thus the screensaver cannot be unlocked and thus rendering the session useless.

Previous 2.4.x did fine.

The cinnamon-desktop is compiled with the right pam file location [1] and the pam file is named cinnamon-screensaver.pam. Its contents are just a copy of other pam services which work fine.

I checked .cache/gdm/session.log, but I'm not sure there's something relevant there. No ~/.xsession-errors to be checked.

How can I debug what's happening?

[1] --with-pam-prefix=/usr/local/etc/pam.d/

dominichayesferen commented 7 years ago

To debug, try these commands in Terminal:

killall cinnamon-screensaver
cinnamon-screensaver

Then lock yourself out Then go into tty1, log in, and type these commands: Cinnamon Stable: export DISPLAY=:0 && killall cinnamon-screensaver Cinnamon NIGHTLY: export DISPLAY=:0 && killall cinnamon-screensaver-main.py Then go back to your (what was locked) session, and look into the Terminal output in there

thomai commented 7 years ago

Same problem on Arch Linux. The work around by @feren works for me but: I cannot open gui applications anymore via the panel after switching back to tty7 (cinnamon session). Any ideas?

dominichayesferen commented 7 years ago

@thomai Not sure, but some of the developers could make do with what output came out of that graphical terminal...

thomai commented 7 years ago

@feren I solved the problem by setting a static hostname on Arch Linux.

mtwebster commented 7 years ago

@thomai on Arch what did you have configured before? You had no /etc/hostname? I'd like to reproduce this so the new screensaver can deal with it properly if it comes up.

thomai commented 7 years ago

@mtwebster Exactly. After creating the file explicitly and inserting a proper hostname, the problem was solved.

dominichayesferen commented 7 years ago

@thomai You may want to check if you had an /etc/hostname file beforehand to help @mtwebster get down to the problem

thomai commented 7 years ago

@feren I checked that already before fixing my problem. The hostname file didn't exist before.

dominichayesferen commented 7 years ago

@mtwebster Ok, so he didn't have the hostname file before, you may want to either see if there's a problem in Cinnamon's control without the hostnames file and/or close the issue...

ghost commented 7 years ago

I have had a similar problem. To wit: sometimes the screensaver will not show the password box and so I can't login and had to restart by pressing the power button. It may be worth mentioned that the problem is accompanied by my chosen screensaver text appearing in more than one place on the screen simultaneously.

lobstaj commented 7 years ago

I'm suffering from the same issue. And yes, I do have /etc/hostname in place and always had.

And I'm experiencing the same symptom as @ACinnamonUserInUK , namely the clock text is displayed twice in different locations. In one place, it's as if it was greyed out or something, and then in another place it's visible nomarlly. It's almost as if there were two screensavers on top of each other and I can only unlock the top one. (I did check that there's only one instance of cinnamon-screensaver running though.)

Another strange thing is that once I'm stuck with the screensaver I cannot unlock, I also can't see the gettys on console 1-6 anymore. I.e. I switch to console 1 with Ctrl+Alt+F1, but I only get a blank screen. The same for consoles 1-6. Once I switched though, I can reboot using Ctrl+Alt+Del.

Seems like it's related to graphics? What chipsets are you others using? Mine is apparently (according to lspci) Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09).

chrisguidry commented 6 years ago

I have a similar issue, but I don't think it's related to /etc/hostname (I have an /etc/hostname already). I'm using LDAP client authentication, which works fine in all other contexts. I've determined that if I remove libnss-ldap, cinnamon-screensaver works as expected.

Following these steps to get debugging messages from cinnamon-screensaver:

$ cinnamon-screensaver-command -e
$ cinnamon-screensaver --debug

Then performing these steps to reproduce:

  1. Ctrl+Alt+L to lock the screen
  2. Wait a moment, maybe 5 seconds
  3. Enter my valid password (I swear, it's valid)
  4. Receive the "Incorrect password" message
  5. Click switch user to get back to the login screen, enter password, it's accepted

I get this output:

Debug mode active
Cinnamon Screensaver support not found in current theme - adding some...
Trying to connect to logind...
Starting screensaver...
Successfully using logind
Found 1 Xinerama screens on display :0
Monitor 0 is 0,0 1366 x 768
Cinnamon Screensaver compiled without Solaris Xinerama support
Scale factor of 1 applied.  Monitor 0 is 0,0 1366 x 768
authClient initialize... initialized already: False
authClient initialize... initialized already: True
[... repeated many times ...]
pam_start ("cinnamon-screensaver", "chris", ...) ==> 0 (Success)
authClient initialize... initialized already: True
[... repeated many times ...]
Handling message style 1: 'Password: '
Waiting for respose to message style 1: 'Password: '
Waiting for lock
Waiting for response
Got message style 1: 'Password: '
Output from pam helper: 'CS_PAM_AUTH_SET_PROMPT_Password: _'
authClient idle add auth-prompt
Output from pam helper: 'CS_PAM_AUTH_BUSY_FALSE'
authClient idle add auth-busy
Output from pam helper: ''
authClient initialize... initialized already: True
[... repeated several times ...]
authClient message to child
authClient initialize... initialized already: True
auth_message_handler processing response string
should interrupt: 0
Got response
Got respose to message style 1: interrupt:0
Msg handler returned 1
Output from pam helper: 'CS_PAM_AUTH_BUSY_TRUE'
authClient idle add auth-busy
Output from pam helper: ''
   pam_authenticate (...) ==> 7 (Authentication failure)
 pam_end (...) ==> 0 (Success)
Verify user returned: FALSE
Verify user returned error: Incorrect password.
Authentication failed, retrying (1)
Output from pam helper: 'CS_PAM_AUTH_FAILURE'
authClient idle add failure
Output from pam helper: ''
pam_start ("cinnamon-screensaver", "chris", ...) ==> 0 (Success)
Handling message style 1: 'Password: '
Waiting for respose to message style 1: 'Password: '
Waiting for lock
Waiting for response
Got message style 1: 'Password: '
Output from pam helper: 'CS_PAM_AUTH_SET_PROMPT_Password: _'
authClient idle add auth-prompt
Output from pam helper: 'CS_PAM_AUTH_BUSY_FALSE'
authClient idle add auth-busy
Output from pam helper: ''
authClient initialize... initialized already: True
[... repeated many times ...]
Received Lock from session manager
authClient initialize... initialized already: True
Received Unlock from session manager
authClient message to child
auth_message_handler processing response string
Got no response
should interrupt: 1
Got response
Got respose to message style 1: interrupt:1
Msg handler returned 0
   pam_authenticate (...) ==> 7 (Authentication failure)
Output from pam helper: 'CS_PAM_AUTH_CANCELLED'
authClient idle add cancel
Output from pam helper: ''
authClient helper process completed...
helper process did not exit cleanly: Child process killed by signal 15
Received Active changed from session manager
authClient cancel requested, but no helper process

Thanks in advance for looking into this.

chrisguidry commented 6 years ago

An interesting followup, I believe what I'm seeing here:

http://pubs.opengroup.org/onlinepubs/8329799/chap5.htm

Indicates that error 7 from pam_authenticate is PAM_PERM_DENIED, which makes it sound like cinnamon-screensaver isn't running with high enough privilege to authenticate me?

chrisguidry commented 6 years ago

Ah, please disregard, it turns out I had missed one piece of the LDAP auth setup (installing libpam-ldap). Now cinnamon-screensaver is able to unlock for me.

dan-stromberg commented 4 years ago

For me, on Linux Mint 19.1, my /etc/shadow was root.root 640. I changed it to root.shadow 640. Then I was able to reopen my session.

mike1808 commented 1 year ago

Hey. I'm using cinnamon-screensaver 5.6.3 on Linux workstation 5.15.91-1-MANJARO #1 SMP PREEMPT and seeing this exact issue. Every time I'm trying to turn on the system after sleep it locks out itself and produces mentioned logs like these:

Mar 01 18:49:27 workstation cinnamon-screensaver-pam-helper[87653]: pam_unix(cinnamon-screensaver:auth): conversation failed Mar 01 18:49:27 workstation cinnamon-screensaver-pam-helper[87653]: pam_unix(cinnamon-screensaver:auth): auth could not identify password for [xxxx]

sebgre commented 1 month ago

@mike1808 Hi Mike. I know this is an old post, but I have the exact same issue on Arch Linux with cinnamon-screensaver 6.0.3-1. It may also be the case with late 5 versions as I’m struggling with this issue for about 2 months now. Have you found a solution to this problem?