chore: test for gdm-password alternative in utility scripts
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user