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 ; }
|
(( EUID == 0 )) || { echo >&2 "Not root." ; exit 1 ; }
|
||||||
|
|
||||||
update-alternatives --set gdm-smartcard /etc/pam.d/gdm-smartcard-sssd-or-password
|
if [ -e /etc/pam.d/gdm-smartcard-sssd-or-password ] ; then
|
||||||
sed -Ei 's/(enable-smartcard-authentication)=.*/\1=false/' /etc/dconf/db/gdm.d/03-smartcard
|
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
|
dconf update
|
||||||
|
|
||||||
systemctl enable sssd.service sssd-pam.socket
|
systemctl enable sssd.service sssd-pam.socket
|
||||||
systemctl start sssd.service
|
systemctl start sssd.service || exit 1
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Please restart desktop manager with command:
|
Please restart desktop manager with command:
|
||||||
|
|||||||
@@ -6,8 +6,12 @@
|
|||||||
|
|
||||||
(( EUID == 0 )) || { echo >&2 "Not root." ; exit 1 ; }
|
(( EUID == 0 )) || { echo >&2 "Not root." ; exit 1 ; }
|
||||||
|
|
||||||
update-alternatives --set gdm-smartcard /etc/pam.d/gdm-smartcard-pkcs11-exclusive
|
update-alternatives --set gdm-smartcard \
|
||||||
sed -Ei 's/(enable-smartcard-authentication)=.*/\1=true/' /etc/dconf/db/gdm.d/03-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
|
dconf update
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user