View previous topic :: View next topic |
Author |
Message |
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Wed Feb 14, 2018 7:27 am Post subject: [solved] kde5 screenlock unlock fails after migrating system |
|
|
I can't unlock the screenlock in plasma 5 after migrating to new SSD:
I get a new SSD and I want to migrate all the files of my old hard drive to the new SSD instead of installing new system from zero. I ran the command "cp -r -p" and copied all the folders to the new SSD except for /boot, /dev, /mnt, /proc, /sys, /tmp, (I create them manually) preserving all the permissions of each folder, each file. After finishing the copy, I recreated the bootloader.
It works fine when I boot with the new SSD. However, it seems all go well except for unlocking screenlock of plasma5. it says "Authentification Failure". I start my plasma5 by startx. The password is correct, I can access my account. I can run sudo, shutdown and reboot without any problem. Unlocking the screenlock works fine in the old hard drive. Could someone tell me what I missed?
Thank you.
Last edited by pd1986 on Thu Mar 15, 2018 12:36 pm; edited 1 time in total |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Wed Feb 14, 2018 11:43 pm Post subject: |
|
|
Are you using systemd, elogind, or consolekit?
Are you able to unlock session from other terminal (Alt+Fn)? |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Wed Feb 14, 2018 11:52 pm Post subject: |
|
|
If you use startx, then what is in your ~/.xinitrc? |
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Fri Feb 16, 2018 3:24 am Post subject: |
|
|
PrSo wrote: | Are you using systemd, elogind, or consolekit?
Are you able to unlock session from other terminal (Alt+Fn)? |
I am using consolkit. How can I unlock session from other terminal? what is the command? Thanks |
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Fri Feb 16, 2018 3:25 am Post subject: |
|
|
asturm wrote: | If you use startx, then what is in your ~/.xinitrc? |
Code: | exec ck-launch-session dbus-launch --sh-syntax --exit-with-session startkde |
It worked before |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Fri Feb 16, 2018 11:35 am Post subject: |
|
|
pd1986 wrote: |
I am using consolkit. How can I unlock session from other terminal? what is the command? Thanks |
If I remember correctly you have to be root:
Code: | dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Session1 org.freedesktop.ConsoleKit.SessionUnlock |
assumig that X is on session1, to check on what session X is running:
I took it from topic: https://forums.gentoo.org/viewtopic-t-1046566-start-0.html |
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Fri Feb 16, 2018 8:51 pm Post subject: |
|
|
PrSo wrote: | pd1986 wrote: |
I am using consolkit. How can I unlock session from other terminal? what is the command? Thanks |
If I remember correctly you have to be root:
Code: | dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Session1 org.freedesktop.ConsoleKit.SessionUnlock |
assumig that X is on session1, to check on what session X is running:
I took it from topic: https://forums.gentoo.org/viewtopic-t-1046566-start-0.html |
it doesn't work. it says unknown method, No such interface on org.freedesktop.ConsoleKit" on object at path ......
I am sure that I ran it with right session number. |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Sun Feb 18, 2018 12:42 pm Post subject: |
|
|
That is really strange.
I haven't use consolekit since a year or so (I am using elogind now), but as I remember correctly this way of unlocking the session was working as expected on my machine.
I have founded full bash script to unlock session on mailing list:
http://readlist.com/lists/gentoo.org/gentoo-user/41/209925.html, which basically does the same as previously mentioned command but IMHO is worth a try.
Maybe you should try to reemerge dbus and consolekit, I think that this could resolve permission problems.
Is there anything in your xorg or session logs that could give us a clue what is going on? |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Wed Feb 21, 2018 5:41 pm Post subject: |
|
|
No, completely unrelated. |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Wed Feb 21, 2018 5:51 pm Post subject: |
|
|
asturm wrote: | No, completely unrelated. |
Yeah, sorry. My misatke. |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2280 Location: Adendorf, Germany
|
Posted: Thu Feb 22, 2018 12:39 pm Post subject: |
|
|
pd1986 wrote: | it says unknown method, No such interface on org.freedesktop.ConsoleKit" on object at path ......
I am sure that I ran it with right session number. | So you have latest ConsoleKit2 and dbus is actually running? _________________ Important German:- "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
- "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
|
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Wed Feb 28, 2018 2:12 pm Post subject: |
|
|
Yamakuzure wrote: | pd1986 wrote: | it says unknown method, No such interface on org.freedesktop.ConsoleKit" on object at path ......
I am sure that I ran it with right session number. | So you have latest ConsoleKit2 and dbus is actually running? |
I have checked. both are running but only consolekit 1.2.0 is installed. Right now, I disable the screenlock option so it doesn't bother me too much. If it could be solved it would be better. Thanks. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Tue Mar 06, 2018 6:08 pm Post subject: |
|
|
Quote: | The screen locker is broken and unlocking is not possible anymore.
In order to unlock switch to a virtual terminal (e.g. Ctrl+Alt+F2), log in and execute the command:
loginctl unlock-sessions
Afterwards switch back to the running session (Ctrl+Alt+F7). |
I had the above problem again just now (Gentoo Stable with plasma-meta-5.11.5, openrc-0.34.11 and consolekit-1.2.0) and the following script I launched from TTY1 successfully unlocked the X11 session on TTY7:
Code: | fitzcarraldo@clevow230ss ~ $ cat unlockKDEsession.sh
#!/bin/bash
# Screen locker broken in KDE with ConsoleKit
# See https://forums.gentoo.org/viewtopic-t-1046566.html
# and https://forums.gentoo.org/viewtopic-t-1054134.html
# Find which session is locked
session=Session$(ck-list-sessions | grep -B10 "x11-display = ':0" | grep -o -P '(?<=Session).*(?=:)')
# Create Bash script to unlock session
echo "#!/bin/bash" > /unlock.sh
echo "su -c 'dbus-send --system --print-reply --dest=\"org.freedesktop.ConsoleKit\" /org/freedesktop/ConsoleKit/$session org.freedesktop.ConsoleKit.Session.Unlock'" >> /unlock.sh
chmod +x /unlock.sh
# Run Bash script in another TTY
openvt -s -w /unlock.sh |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Tue Mar 06, 2018 6:12 pm Post subject: |
|
|
fwiw, Plasma 5.12* provides a new `ck-unlock-session` script, and in 5.13 upstream seems to have added one out of the box. |
|
Back to top |
|
|
188562 Apprentice
Joined: 22 Jun 2008 Posts: 186
|
Posted: Wed Mar 07, 2018 8:03 pm Post subject: |
|
|
Code: | su -
chown root:root /usr/lib64/libexec/kcheckpass
chmod 4755 /usr/lib64/libexec/kcheckpass |
helps for my |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Wed Mar 07, 2018 8:58 pm Post subject: |
|
|
Don't do that. |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Tue Mar 13, 2018 12:33 pm Post subject: |
|
|
Two days ago I was hit by this issue too. I was migrating from hdd to ssd via "rsync -av ...". After sucessfull reboot when the plasma's screenlocker triggered I was not able to unlock session by entering the correct password for my user.
In "/var/log/auth.log" I have spotted: Code: | unix_chkpwd[2384]: check pass; user unknown
unix_chkpwd[2384]: password check failed for user (..)
kcheckpass[2365]: pam_unix(kde:auth): authentication failure; logname= uid=1000 euid=1000 tty=:0 ruser= rhost= user=..
kcheckpass[2365]: Authentication failure for .. (invoked by uid 1000) |
In my case it was something with a pam packages. Reemerging them with
Code: | emerge -1 kde-plasma/kwallet-pam sys-auth/pambase sys-libs/pam virtual/pam |
and rebooting the netbook solved the problem.
I am using elogind, so I am not 100% sure if this will work for you, but IMHO it is worth a try.
BTW I still wonder what went wrong during rsync tough. |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8933
|
Posted: Tue Mar 13, 2018 12:40 pm Post subject: |
|
|
Rsync operation lost filecaps on the binary. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3920 Location: Hamburg
|
Posted: Tue Mar 13, 2018 12:41 pm Post subject: Re: kde5 screenlock unlock fails |
|
|
pd1986 wrote: | I ran the command "cp -r -p" | Maybe OT but I do prefer. |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Tue Mar 13, 2018 2:26 pm Post subject: |
|
|
asturm wrote: | Rsync operation lost filecaps on the binary. |
Sorry for the OT but thank you very much astum.
Since i have that old hdd untouched I corrected my mistake (I hope so) by
Code: | cp --attributes-only -ar | on "root" partition. (as toralf suggested). |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2280 Location: Adendorf, Germany
|
Posted: Wed Mar 14, 2018 8:02 am Post subject: |
|
|
PrSo wrote: | I was migrating from hdd to ssd via "rsync -av ...". | That is not enough. You need at least "rsync -avHAX", or you won't get neither xattr nor ACL transported and loose all hardlinks.
And when migrating a HD with a system on it, I'd do this twice with "rsync -avHAXc" on the second run, which will check the checksums of all files.
I know this is a rather paranoid approach, but I've already lost a system by using -av only and not checking afterwards... _________________ Important German:- "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
- "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
|
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Thu Mar 15, 2018 12:36 pm Post subject: |
|
|
PrSo wrote: | Two days ago I was hit by this issue too. I was migrating from hdd to ssd via "rsync -av ...". After sucessfull reboot when the plasma's screenlocker triggered I was not able to unlock session by entering the correct password for my user.
In "/var/log/auth.log" I have spotted: Code: | unix_chkpwd[2384]: check pass; user unknown
unix_chkpwd[2384]: password check failed for user (..)
kcheckpass[2365]: pam_unix(kde:auth): authentication failure; logname= uid=1000 euid=1000 tty=:0 ruser= rhost= user=..
kcheckpass[2365]: Authentication failure for .. (invoked by uid 1000) |
In my case it was something with a pam packages. Reemerging them with
Code: | emerge -1 kde-plasma/kwallet-pam sys-auth/pambase sys-libs/pam virtual/pam |
and rebooting the netbook solved the problem.
I am using elogind, so I am not 100% sure if this will work for you, but IMHO it is worth a try.
BTW I still wonder what went wrong during rsync tough. |
It solves the problem. Thank you. |
|
Back to top |
|
|
|