diff --git a/usr/share/orange-yourdev-login/login-password b/usr/share/orange-yourdev-login/login-password index 6362c8f..d16d17d 100755 --- a/usr/share/orange-yourdev-login/login-password +++ b/usr/share/orange-yourdev-login/login-password @@ -6,11 +6,17 @@ (( EUID == 0 )) || { echo >&2 "Not root." ; exit 1 ; } -update-alternatives --set gdm-smartcard /etc/pam.d/gdm-smartcard-sssd-or-password -sed -Ei 's/(enable-smartcard-authentication)=.*/\1=false/' /etc/dconf/db/gdm.d/03-smartcard +if [ -e /etc/pam.d/gdm-smartcard-sssd-or-password ] ; then + update-alternatives --set gdm-smartcard \ + /etc/pam.d/gdm-smartcard-sssd-or-password +fi + +sed -Ei 's/(enable-smartcard-authentication)=.*/\1=false/' \ + /etc/dconf/db/gdm.d/03-smartcard dconf update + systemctl enable sssd.service sssd-pam.socket -systemctl start sssd.service +systemctl start sssd.service || exit 1 cat << EOF Please restart desktop manager with command: diff --git a/usr/share/orange-yourdev-login/login-pki b/usr/share/orange-yourdev-login/login-pki index 9598191..062b517 100755 --- a/usr/share/orange-yourdev-login/login-pki +++ b/usr/share/orange-yourdev-login/login-pki @@ -6,8 +6,12 @@ (( EUID == 0 )) || { echo >&2 "Not root." ; exit 1 ; } -update-alternatives --set gdm-smartcard /etc/pam.d/gdm-smartcard-pkcs11-exclusive -sed -Ei 's/(enable-smartcard-authentication)=.*/\1=true/' /etc/dconf/db/gdm.d/03-smartcard +update-alternatives --set gdm-smartcard \ + /etc/pam.d/gdm-smartcard-pkcs11-exclusive \ + || { echo >&2 "Cannot switch to PKI login (GDM too old?)" ; exit 1 ; } + +sed -Ei 's/(enable-smartcard-authentication)=.*/\1=true/' \ + /etc/dconf/db/gdm.d/03-smartcard dconf update cat << EOF