You are not logged in.

#1 2018-01-21 13:43:12

cscphy
Member
Registered: 2017-05-06
Posts: 36

[solved] kde not starting, dm-crypted home

Hi,

after an hw update kde seems to not start anymore for a user whose home is encrypted with dm-crypt. I configured the automount at login as here, with the (bugfix?) modification mentioned here.

After typing the password in sddm the screen freezes, I can still move the mouse and pass to another console, but nothing happens. Here is an excerpt of journalctl.

gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Created slice user-1001.slice.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Created slice system-systemd\x2dfsck.slice.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Starting File System Check on /dev/mapper/home-user...
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Started cryptsetup-user.service.
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[435]: pam_kwallet5(sddm:auth): (null): pam_sm_authenticate
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: home-user.automount: Got automount request for /home/user, triggered by 435 (sddm-helper)
gen 21 14:22:50 mycomputer-XPS13-9333 systemd-fsck[589]: /dev/mapper/home-user: clean, 448383/1784832 files, 45447341/114216062 blocks
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Started File System Check on /dev/mapper/home-user.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Mounting /home/user...
gen 21 14:22:50 mycomputer-XPS13-9333 kernel: EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Mounted /home/user.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Starting User Manager for UID 1001...
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[597]: pam_unix(systemd-user:session): session opened for user user by (uid=0)
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[597]: Failed to fully start up daemon: Permission denied
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: user@1001.service: Failed with result 'protocol'.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[598]: pam_unix(systemd-user:session): session closed for user user
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Failed to start User Manager for UID 1001.
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[435]: [PAM] returning.
gen 21 14:22:50 mycomputer-XPS13-9333 sddm[319]: Authenticated successfully
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-greeter[396]: Message received from daemon: LoginSucceeded
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[435]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[435]: pam_unix(sddm:session): session opened for user user by (uid=0)
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Starting User Manager for UID 1001...
gen 21 14:22:50 mycomputer-XPS13-9333 systemd-logind[278]: New session c2 of user user.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: pam_unix(systemd-user:session): session opened for user user by (uid=0)
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Started Session c2 of user user.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Listening on GnuPG cryptographic agent and passphrase cache.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Starting D-Bus User Message Bus Socket.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Listening on GnuPG network certificate management daemon.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Reached target Paths.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Listening on Sound System.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Reached target Timers.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Listening on D-Bus User Message Bus Socket.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Reached target Sockets.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Reached target Basic System.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Reached target Default.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[601]: Startup finished in 17ms.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Started User Manager for UID 1001.
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[435]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[435]: pam_kwallet5(sddm:session): pam_kwallet5: final socket path: /run/user/1001/kwallet5.socket
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[435]: Starting: "/usr/share/sddm/scripts/Xsession \"/usr/bin/startkde\""
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[609]: Adding cookie to "/home/user/.Xauthority"
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[388]: [PAM] Closing session
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[388]: pam_unix(sddm-greeter:session): session closed for user sddm
gen 21 14:22:50 mycomputer-XPS13-9333 sddm-helper[388]: [PAM] Ended.
gen 21 14:22:50 mycomputer-XPS13-9333 sddm[319]: Auth: sddm-helper exited successfully
gen 21 14:22:50 mycomputer-XPS13-9333 sddm[319]: Greeter stopped.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd-logind[278]: Removed session c1.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Stopping User Manager for UID 995...
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Stopping D-Bus User Message Bus...
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Stopped target Default.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Stopped D-Bus User Message Bus.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Stopped target Basic System.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Stopped target Sockets.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Closed GnuPG cryptographic agent (ssh-agent emulation).
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Closed GnuPG cryptographic agent and passphrase cache.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Closed Sound System.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Closed GnuPG network certificate management daemon.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Stopped target Timers.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Stopped target Paths.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Closed D-Bus User Message Bus Socket.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Reached target Shutdown.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Starting Exit the Session...
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[390]: Received SIGRTMIN+24 from PID 611 (kill).
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Stopped User Manager for UID 995.
gen 21 14:22:50 mycomputer-XPS13-9333 systemd[1]: Removed slice User Slice of sddm.

The log shows that the encrypted home is successfully opened and mounted; in fact, from another console I can check that this is the case. However, kde seems to not start. Anyone has an idea? Perhaps some wrong dependences of system services?

The weird thing is that, for a user with no encrypted home, everything works perfectly. Also, the problem has appeared after I upgraded the hd, simply copying with cp -a the old root partition to the new one.

Edit: marked as solved

Last edited by cscphy (2018-01-22 06:28:41)

Offline

#2 2018-01-22 06:27:55

cscphy
Member
Registered: 2017-05-06
Posts: 36

Re: [solved] kde not starting, dm-crypted home

It turns out it was a simple permission problem. Somehow the home directory had owner root and permissions not to write for the user. Most probable cause: in order to copy the home from the old to the new hardware, both old and new partitions were mounted as root. Problem was solved by (after logging via console with user, and giving su)

cd /home/user
chown user:user .
chmod go-wrx .

Offline

Board footer

Powered by FluxBB