Update ADconnection.sh

This commit is contained in:
PierreGoude 2017-12-11 09:55:59 +01:00 committed by GitHub
parent 07cf4a8998
commit 7131d90c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -880,7 +880,6 @@ eof
} }
############################### Raspberry Pi ################################### ############################### Raspberry Pi ###################################
#not tested yet
raspberry(){ raspberry(){
export HOSTNAME export HOSTNAME
@ -897,6 +896,7 @@ read -r ADMIN
sudo realm join -v -U $ADMIN $DOMAIN --install=/ sudo realm join -v -U $ADMIN $DOMAIN --install=/
sudo systemctl start sssd sudo systemctl start sssd
echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee -a /etc/pam.d/common-session 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 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/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 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 ########################################## ############################### Reauth ##########################################
Reauthenticate(){ 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 ####################################### ########################################### info #######################################