chore: add utility script to switch login mode

This commit is contained in:
Michel Decima
2021-10-13 13:35:32 +02:00
parent 151c17f676
commit 3f647b7fb4
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#!/bin/bash
#
# Written by Michel Decima
# Copyright (C) 2020 Orange
#
(( 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
dconf update
systemctl enable sssd.service sssd-pam.socket
systemctl start sssd.service
cat << EOF
Please restart desktop manager with command:
systemctl restart gdm3
EOF

View File

@@ -0,0 +1,17 @@
#!/bin/bash
#
# Written by Michel Decima
# Copyright (C) 2020 Orange
#
(( 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
dconf update
cat << EOF
Please restart desktop manager with command:
systemctl restart gdm3
EOF