Update ADconnection.sh

This commit is contained in:
PierreGode 2018-03-26 11:02:28 +02:00 committed by GitHub
parent 603a649611
commit 70ba12f71d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,13 +33,13 @@ MENU_FN
####################### Setup for Ubuntu 14,16 and 17 clients ####################################### ####################### Setup for Ubuntu 14,16 and 17 clients #######################################
#Runs ADjoin in debug mode. meaning it opens terminals following logs #Runs ADjoin in debug mode. meaning it opens terminals following logs
ubuntuclientdebug(){ linuxclientdebug(){
desktop=$(sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop) desktop=$(sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop)
gnome-terminal --geometry=130x20 -e "bash -c \"journalctl -fxe; exec bash\"" gnome-terminal --geometry=130x20 -e "bash -c \"journalctl -fxe; exec bash\""
gnome-terminal --geometry=130x20 -e "bash -c \"journalctl -fxe | grep -i -e closed -e Successfully -e 'Preauthentication failed' -e 'authenticate' -e 'Failed to join the domain'; exec bash\"" gnome-terminal --geometry=130x20 -e "bash -c \"journalctl -fxe | grep -i -e closed -e Successfully -e 'Preauthentication failed' -e 'authenticate' -e 'Failed to join the domain'; exec bash\""
ubuntuclient linuxclient
} }
ubuntuclient(){ linuxclient(){
desktop=$(sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop) desktop=$(sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop)
if [ $? = 0 ] if [ $? = 0 ]
then then
@ -484,7 +484,6 @@ myhost=$( hostname )
export whoami export whoami
whoamis=$( whoami ) whoamis=$( whoami )
admins=$( cat /etc/passwd | grep home | grep bash | cut -d ':' -f1 ) admins=$( cat /etc/passwd | grep home | grep bash | cut -d ':' -f1 )
echo "$admins ALL=(ALL:ALL) ALL | tee -a /etc/sudoers.d/admin"
sudo echo "${RED_TEXT}"Installing pakages do no abort!......."${INTRO_TEXT}" sudo echo "${RED_TEXT}"Installing pakages do no abort!......."${INTRO_TEXT}"
sudo apt-get update sudo apt-get update
sudo apt-get install libsss-sudo -y sudo apt-get install libsss-sudo -y
@ -1086,7 +1085,7 @@ exit
#echo "Remember to recreate AD computer Object if you have upgraded the OS "versions will now match!" #echo "Remember to recreate AD computer Object if you have upgraded the OS "versions will now match!"
#sleep 3 #sleep 3
#sudo domainjoin-cli leave #sudo domainjoin-cli leave
#ubuntuclient #linuxclient
#} #}
############################### Fail check #################################### ############################### Fail check ####################################
@ -1195,7 +1194,7 @@ fi
# ;; # ;;
# [Nn]* ) # [Nn]* )
# sudo realm leave $realmad # sudo realm leave $realmad
# ubuntuclient # linuxclient
# ;; # ;;
# esac # esac
#} #}
@ -1300,7 +1299,7 @@ while [ opt != '' ]
case $opt in case $opt in
1) clear; 1) clear;
echo "Installing on Ubuntu Client/Server"; echo "Installing on Ubuntu Client/Server";
ubuntuclient; linuxclient;
;; ;;
2) clear; 2) clear;
echo "Installing on Debian Jessie client"; echo "Installing on Debian Jessie client";
@ -1312,7 +1311,7 @@ while [ opt != '' ]
;; ;;
4) clear; 4) clear;
echo "Join to AD on Ubuntu Client or Server in debug mode" echo "Join to AD on Ubuntu Client or Server in debug mode"
ubuntuclientdebug linuxclientdebug
;; ;;
5) clear; 5) clear;
echo "Check for errors" echo "Check for errors"