From 7131d90c1272d470a56ad61670293968e8ca6c9d Mon Sep 17 00:00:00 2001 From: PierreGoude Date: Mon, 11 Dec 2017 09:55:59 +0100 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 36f15b9..bc08551 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -880,7 +880,6 @@ eof } ############################### Raspberry Pi ################################### -#not tested yet raspberry(){ export HOSTNAME @@ -897,6 +896,7 @@ read -r ADMIN sudo realm join -v -U $ADMIN $DOMAIN --install=/ sudo systemctl start sssd echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee -a /etc/pam.d/common-session +sudo echo "pi ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers sudo echo "%$myhost""sudoers ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers sed -i -e 's/fallback_homedir = \/home\/%u@%d/#fallback_homedir = \/home\/%u@%d/g' /etc/sssd/sssd.conf sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/g' /etc/sssd/sssd.conf @@ -1027,7 +1027,18 @@ fi ############################### Reauth ########################################## Reauthenticate(){ -echo "NOT FINISHED" +realmad=$(sudo cat /etc/sssd/sssd.conf | grep -i domain | grep -i ad | awk '{print $3}' ) +read -p "Do you wish to keep previous cnfiguration (y/n)?" yn + case $yn in + [Yy]* ) + #sudo realm leave $realmad + #do simple aut without conf + ;; + [Nn]* ) + sudo realm leave $realmad + ubuntuclient + ;; + esac } ########################################### info #######################################