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
603a649611
commit
70ba12f71d
@ -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"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user