chore: add utility script to switch login mode
This commit is contained in:
19
usr/share/orange-yourdev-login/login-password
Executable file
19
usr/share/orange-yourdev-login/login-password
Executable 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
|
||||
|
||||
17
usr/share/orange-yourdev-login/login-pki
Executable file
17
usr/share/orange-yourdev-login/login-pki
Executable 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
|
||||
|
||||
Reference in New Issue
Block a user