mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 16:50:13 +01:00
Update ADconnection.sh
This commit is contained in:
parent
39ede8bedc
commit
74844a2db4
@ -6,7 +6,9 @@
|
|||||||
# This is an normal bash script and can be executed with sh #
|
# This is an normal bash script and can be executed with sh #
|
||||||
# #
|
# #
|
||||||
#####################################################################################################################
|
#####################################################################################################################
|
||||||
#known bugs: see line 453-454
|
|
||||||
|
#known bugs: see line 462-463
|
||||||
|
|
||||||
# ~~~~~~~~~~ Environment Setup ~~~~~~~~~~ #
|
# ~~~~~~~~~~ Environment Setup ~~~~~~~~~~ #
|
||||||
NORMAL=`echo "\033[m"`
|
NORMAL=`echo "\033[m"`
|
||||||
MENU=`echo "\033[36m"` #Blue
|
MENU=`echo "\033[36m"` #Blue
|
||||||
@ -15,6 +17,7 @@
|
|||||||
INTRO_TEXT=`echo "\033[32m"` #green and white text
|
INTRO_TEXT=`echo "\033[32m"` #green and white text
|
||||||
END=`echo "\033[0m"`
|
END=`echo "\033[0m"`
|
||||||
# ~~~~~~~~~~ Environment Setup ~~~~~~~~~~ #
|
# ~~~~~~~~~~ Environment Setup ~~~~~~~~~~ #
|
||||||
|
|
||||||
####################### Setup for Ubuntu16 and Ubuntu 14 clients #######################################
|
####################### Setup for Ubuntu16 and Ubuntu 14 clients #######################################
|
||||||
ubuntuclient(){
|
ubuntuclient(){
|
||||||
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)
|
||||||
@ -132,6 +135,7 @@ sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/
|
|||||||
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
||||||
eof
|
eof
|
||||||
}
|
}
|
||||||
|
|
||||||
####################### Setup for Ubuntu 14 server #######################################
|
####################### Setup for Ubuntu 14 server #######################################
|
||||||
ubuntuserver14(){
|
ubuntuserver14(){
|
||||||
export HOSTNAME
|
export HOSTNAME
|
||||||
@ -223,6 +227,7 @@ sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/
|
|||||||
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
||||||
eof
|
eof
|
||||||
}
|
}
|
||||||
|
|
||||||
####################### Setup for Debian client #######################################
|
####################### Setup for Debian client #######################################
|
||||||
# This script should join Debian Jessie (8) to an Active Directory domain.
|
# This script should join Debian Jessie (8) to an Active Directory domain.
|
||||||
debianclient(){
|
debianclient(){
|
||||||
@ -303,6 +308,7 @@ sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/
|
|||||||
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
||||||
eof
|
eof
|
||||||
}
|
}
|
||||||
|
|
||||||
############################### Update to Realmd from likewise ##################
|
############################### Update to Realmd from likewise ##################
|
||||||
Realmdupdate(){
|
Realmdupdate(){
|
||||||
export HOSTNAME
|
export HOSTNAME
|
||||||
@ -388,6 +394,7 @@ sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/
|
|||||||
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf
|
||||||
eof
|
eof
|
||||||
}
|
}
|
||||||
|
|
||||||
############################### Fail check ####################################
|
############################### Fail check ####################################
|
||||||
failcheck(){
|
failcheck(){
|
||||||
clear
|
clear
|
||||||
@ -449,9 +456,10 @@ echo Checking PAM auth configuration.. "${RED_TEXT}"FAIL"${END}"
|
|||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
################################ fix errors # funktion not called ################
|
################################ fix errors # funktion not called ################
|
||||||
fixerrors(){
|
fixerrors(){
|
||||||
#this funktion is not called in the script
|
#this funktion is not called in the script : to activate uncommen line line 508 #fixerrors
|
||||||
#This funktion install additional pakages due to known issues with Joining and the join hangs after the admin login
|
#This funktion install additional pakages due to known issues with Joining and the join hangs after the admin login
|
||||||
sudo add-apt-repository ppa:xtrusia/packagekit-fix
|
sudo add-apt-repository ppa:xtrusia/packagekit-fix
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -470,6 +478,7 @@ realm leave $discover
|
|||||||
sudo realm join -v -U $ADMIN $DOMAIN --install=/
|
sudo realm join -v -U $ADMIN $DOMAIN --install=/
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
########################################### info #######################################
|
########################################### info #######################################
|
||||||
readmes(){
|
readmes(){
|
||||||
clear
|
clear
|
||||||
@ -495,6 +504,8 @@ echo "${INTRO_TEXT} Ubuntu 16 and 14 has the setting not to show domain name in
|
|||||||
echo "${INTRO_TEXT} coding issues when building.. to change this configure /et/sssd/sssd.conf ${INTRO_TEXT}"
|
echo "${INTRO_TEXT} coding issues when building.. to change this configure /et/sssd/sssd.conf ${INTRO_TEXT}"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fixerrors
|
||||||
########################################### Menu #######################################
|
########################################### Menu #######################################
|
||||||
clear
|
clear
|
||||||
echo "${INTRO_TEXT} Active directory connection tool ${INTRO_TEXT}"
|
echo "${INTRO_TEXT} Active directory connection tool ${INTRO_TEXT}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user