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
53aaa6d749
commit
bef628fa35
@ -421,6 +421,7 @@ fi
|
|||||||
desktop=$( sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop | head -1 | awk '{print$1}' )
|
desktop=$( sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop | head -1 | awk '{print$1}' )
|
||||||
rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' )
|
rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' )
|
||||||
kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' )
|
kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' )
|
||||||
|
debians=$( hostnamectl | grep -i operating | awk '{print $3}' )
|
||||||
#### OS detection
|
#### OS detection
|
||||||
if [ "$desktop" = "desktop" ]
|
if [ "$desktop" = "desktop" ]
|
||||||
then
|
then
|
||||||
@ -438,10 +439,15 @@ if [ "$fedoras" = "Fedora" ]
|
|||||||
then
|
then
|
||||||
Fedora_fn
|
Fedora_fn
|
||||||
else
|
else
|
||||||
|
if [ "$debians" = "Debian" ]
|
||||||
|
then
|
||||||
|
debianclient
|
||||||
|
else
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo " this seems to be a server, swithching to server mode"
|
echo " this seems to be a server, swithching to server mode"
|
||||||
ubuntuserver14
|
ubuntuserver14
|
||||||
@ -1351,12 +1357,11 @@ clear
|
|||||||
echo "${INTRO_TEXT} DO NOT attempt this without expert knowledge ${INTRO_TEXT}"
|
echo "${INTRO_TEXT} DO NOT attempt this without expert knowledge ${INTRO_TEXT}"
|
||||||
echo "${NORMAL} ${NORMAL}"
|
echo "${NORMAL} ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 1)${MENU} Join to AD on Linux (Ubuntu/Rasbian/Kali/Fedora) ${NORMAL}"
|
echo "${MENU}*${NUMBER} 1)${MENU} Join to AD on Linux (Ubuntu/Rasbian/Kali/Fedora) ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 2)${MENU} Join to AD on Debian Jessie Client ${NORMAL}"
|
echo "${MENU}*${NUMBER} 2)${MENU} Check for errors ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 3)${MENU} Check for errors ${NORMAL}"
|
echo "${MENU}*${NUMBER} 3)${MENU} Search with ldap ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 4)${MENU} Search with ldap ${NORMAL}"
|
echo "${MENU}*${NUMBER} 4)${MENU} Reauthenticate ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 5)${MENU} Reauthenticate ${NORMAL}"
|
echo "${MENU}*${NUMBER} 5)${MENU} Update from Likewise to Realmd for Ubuntu 14 ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 6)${MENU} Update from Likewise to Realmd for Ubuntu 14 ${NORMAL}"
|
echo "${MENU}*${NUMBER} 6)${MENU} Leave Domain ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 7)${MENU} Leave Domain ${NORMAL}"
|
|
||||||
echo "${NORMAL} ${NORMAL}"
|
echo "${NORMAL} ${NORMAL}"
|
||||||
echo "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
|
echo "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
|
||||||
read opt
|
read opt
|
||||||
@ -1370,27 +1375,24 @@ while [ opt != '' ]
|
|||||||
echo "Installing on Linux Client/Server";
|
echo "Installing on Linux Client/Server";
|
||||||
linuxclient;
|
linuxclient;
|
||||||
;;
|
;;
|
||||||
|
|
||||||
2) clear;
|
2) clear;
|
||||||
echo "Installing on Debian Jessie client";
|
|
||||||
debianclient
|
|
||||||
;;
|
|
||||||
3) clear;
|
|
||||||
echo "Check for errors"
|
echo "Check for errors"
|
||||||
failcheck
|
failcheck
|
||||||
;;
|
;;
|
||||||
4) clear;
|
3) clear;
|
||||||
echo "Check in Ldap"
|
echo "Check in Ldap"
|
||||||
ldaplook
|
ldaplook
|
||||||
;;
|
;;
|
||||||
5) clear;
|
4) clear;
|
||||||
echo "Rejoin to AD"
|
echo "Rejoin to AD"
|
||||||
Reauthenticate
|
Reauthenticate
|
||||||
;;
|
;;
|
||||||
6) clear;
|
5) clear;
|
||||||
echo "Update from Likewise to Realmd"
|
echo "Update from Likewise to Realmd"
|
||||||
Realmdupdate
|
Realmdupdate
|
||||||
;;
|
;;
|
||||||
7)
|
6)
|
||||||
clear;
|
clear;
|
||||||
echo "Leave domain"
|
echo "Leave domain"
|
||||||
leave
|
leave
|
||||||
@ -1417,12 +1419,11 @@ clear
|
|||||||
echo " DO NOT attempt this without expert knowledge "
|
echo " DO NOT attempt this without expert knowledge "
|
||||||
echo ""
|
echo ""
|
||||||
echo "1) Join to AD on Linux (Ubuntu/Rasbian/Kali/Fedora)"
|
echo "1) Join to AD on Linux (Ubuntu/Rasbian/Kali/Fedora)"
|
||||||
echo "2) Join to AD on Debian Jessie Client"
|
echo "2) Check for errors"
|
||||||
echo "3) Check for errors"
|
echo "3) Search with ldap"
|
||||||
echo "4) Search with ldap"
|
echo "4) Reauthenticate"
|
||||||
echo "5) Reauthenticate"
|
echo "5) Update from Likewise to Realmd for Ubuntu 14"
|
||||||
echo "6) Update from Likewise to Realmd for Ubuntu 14"
|
echo "6) Leave Domain"
|
||||||
echo "7) Leave Domain"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Please enter a menu option and enter or enter to exit."
|
echo "Please enter a menu option and enter or enter to exit."
|
||||||
read opt
|
read opt
|
||||||
@ -1437,26 +1438,22 @@ while [ opt != '' ]
|
|||||||
linuxclient;
|
linuxclient;
|
||||||
;;
|
;;
|
||||||
2) clear;
|
2) clear;
|
||||||
echo "Installing on Debian Jessie client";
|
|
||||||
debianclient
|
|
||||||
;;
|
|
||||||
3) clear;
|
|
||||||
echo "Check for errors"
|
echo "Check for errors"
|
||||||
failcheck_yum
|
failcheck_yum
|
||||||
;;
|
;;
|
||||||
4) clear;
|
3) clear;
|
||||||
echo "Check in Ldap"
|
echo "Check in Ldap"
|
||||||
ldaplook
|
ldaplook
|
||||||
;;
|
;;
|
||||||
5) clear;
|
4) clear;
|
||||||
echo "Rejoin to AD"
|
echo "Rejoin to AD"
|
||||||
Reauthenticate
|
Reauthenticate
|
||||||
;;
|
;;
|
||||||
6) clear;
|
5) clear;
|
||||||
echo "Update from Likewise to Realmd"
|
echo "Update from Likewise to Realmd"
|
||||||
Realmdupdate
|
Realmdupdate
|
||||||
;;
|
;;
|
||||||
7)
|
5)
|
||||||
clear;
|
clear;
|
||||||
echo "Leave domain"
|
echo "Leave domain"
|
||||||
leave
|
leave
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user