خرید بک لینک

On my machine, I have Fedora 23 (Server) and KDE 5.19. SELinux is deactivated. Furthermore, I have an encrypted home volume (using LUKS). As soon as the user logs in on the SDDM greeter, the encrypted volume is decrypted an mounted to the user's home directory. To achieve this, I have used pam_mount and edited /etc/pam.d/login and /etc/pam.d/password-auth as follows:

---------- /etc/pam.d/login -----------

#%PAM-1.0
auth       substack     system-auth
auth       include      postlogin
auth optional pam_mount.so

account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
session    include      postlogin
-session   optional     pam_ck_coector.so
session optional pam_mount.so

------------ /etc/pam.d/password-auth -------------

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_mount.so
auth        required      pam_env.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success
auth        required      pam_deny.so
auth required pam_env.so

account     required      pam_unix.so
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     required      pam_permit.so

password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password    required      pam_deny.so

session optional pam_winbind.so
session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
-session     optional      pam_systemd.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session optional pam_mount.so

This was enough to decrypt and mount the volume if the user logs in manually in the greeter.

Now, I want that the same happens when autologin is enabled (I am aware that encryption and autologin seems senseless). In the KDE settings I have enabled the autologin for the user. Unfortunately, the volume is not decrypted and not mounted. The user gets just a standard home directory after the autologin.

The obvious idea was to add pam_mount.so entries to /etc/pam.d/sddm-autologin. But whatever I try with sddm-autologin, it has no effect.

In joualctl /usr/bin/sddm I see the following lines:

localhost.localdomain sddm[859]: (pam_mount.c:365): pam_mount 2.15: entering auth stage
localhost.localdomain sddm[859]: (pam_mount.c:568): pam_mount 2.15: entering session stage
localhost.localdomain sddm[859]: (mount.c:263): Mount info: globalconf, user=MyUserName <volume fstype="crypt" server="(null)" path="/dev/homeVG/home-MyUserName" mountpoint="/home/MyUserName" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="fsck,noatime" /> fstab=0 ssh=0
localhost.localdomain sddm[859]: (mount.c:660): Password will be sent to helper as-is.
localhost.localdomain sddm[859]: command: 'mount' '-t' 'crypt' '-ofsck,noatime' '/dev/homeVG/home-MyUserName' '/home/MyUserName'
localhost.localdomain sddm[859]: (mount.c:68): Messages from underlying mount program:
localhost.localdomain sddm[859]: (mount.c:72): crypt_activate_by_passphrase: Operation not permitted

Does anybody have an idea how to get decryption of the volume and mounting it to the user's home directory also with an autologin?

- - , .

برچسب: نویسنده: استخدام کار تاريخ: جمعه 14 اسفند 1394 ساعت: 18:12

صفحه بندی