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
a605dac6ab
commit
7c475aa8f3
@ -698,9 +698,28 @@ else
|
|||||||
echo Checking PAM auth configuration.. "${RED_TEXT}"FAIL ssh security not configured"${END}"
|
echo Checking PAM auth configuration.. "${RED_TEXT}"FAIL ssh security not configured"${END}"
|
||||||
fi
|
fi
|
||||||
realm discover
|
realm discover
|
||||||
|
echo "-------------------------------------------------------------------------------------"
|
||||||
|
realm list
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#################################### ldapsearch #####################################################
|
||||||
|
ldaplook(){
|
||||||
|
export HOSTNAME
|
||||||
|
myhost=$( hostname )
|
||||||
|
if [ -f /etc/ldap/ldap.conf ]
|
||||||
|
then
|
||||||
|
echo "ldap tool installed.. verifying setup"
|
||||||
|
sudo ldapsearch | grep -i $myhost
|
||||||
|
else
|
||||||
|
sudo apt-get install ldap-tools -y
|
||||||
|
echo "please edit ldap.conf"
|
||||||
|
sudo nano /etc/ldap/ldap.conf
|
||||||
|
sudo ldapsearch | grep -i $myhost
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
############################### Reauth ##########################################
|
############################### Reauth ##########################################
|
||||||
Reauthenticate14(){
|
Reauthenticate14(){
|
||||||
DOMAIN=$(realm discover | grep -i realm.name | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//')
|
DOMAIN=$(realm discover | grep -i realm.name | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//')
|
||||||
@ -752,11 +771,11 @@ clear
|
|||||||
echo "${INTRO_TEXT} This script will edit several critical files.. ${INTRO_TEXT}"
|
echo "${INTRO_TEXT} This script will edit several critical files.. ${INTRO_TEXT}"
|
||||||
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} Setup AD on Ubuntu Client ${NORMAL}"
|
echo "${MENU}*${NUMBER} 1)${MENU} Setup AD on Ubuntu Client or Server ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 2)${MENU} Setup AD on Ubuntu 14 Server ${NORMAL}"
|
echo "${MENU}*${NUMBER} 2)${MENU} Setup AD on Debian Jessie Client ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 3)${MENU} Setup AD on Debian Jessie Client ${NORMAL}"
|
echo "${MENU}*${NUMBER} 3)${MENU} Setup AD on Debian CentOS ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 4)${MENU} Setup AD on Debian CentOS ${NORMAL}"
|
echo "${MENU}*${NUMBER} 4)${MENU} Check for errors ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 5)${MENU} Check for errors ${NORMAL}"
|
echo "${MENU}*${NUMBER} 5)${MENU} Chech in ldap ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 6)${MENU} Reauthenticate (Ubuntu14 only) ${NORMAL}"
|
echo "${MENU}*${NUMBER} 6)${MENU} Reauthenticate (Ubuntu14 only) ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 7)${MENU} Update from Likewise to Realmd for Ubuntu 14 ${NORMAL}"
|
echo "${MENU}*${NUMBER} 7)${MENU} Update from Likewise to Realmd for Ubuntu 14 ${NORMAL}"
|
||||||
echo "${MENU}*${NUMBER} 8)${MENU} README with examples ${NORMAL}"
|
echo "${MENU}*${NUMBER} 8)${MENU} README with examples ${NORMAL}"
|
||||||
@ -770,30 +789,30 @@ while [ opt != '' ]
|
|||||||
else
|
else
|
||||||
case $opt in
|
case $opt in
|
||||||
1) clear;
|
1) clear;
|
||||||
echo "Installing on Ubuntu Client";
|
echo "Installing on Ubuntu Client/Server";
|
||||||
ubuntuclient;
|
ubuntuclient;
|
||||||
;;
|
;;
|
||||||
|
|
||||||
2) clear;
|
2) clear;
|
||||||
echo "Installing on Ubuntu 14 Server";
|
echo "Installing on Debian Jessie client";
|
||||||
ubuntuserver14
|
|
||||||
;;
|
|
||||||
|
|
||||||
3) clear;
|
|
||||||
echo "Installing on Debian Jessie client"
|
|
||||||
debianclient
|
debianclient
|
||||||
;;
|
;;
|
||||||
|
|
||||||
4) clear;
|
3) clear;
|
||||||
echo "Installing on Debian Cent OS"
|
echo "Installing on Debian Cent OS"
|
||||||
CentOS
|
CentOS
|
||||||
;;
|
;;
|
||||||
|
|
||||||
5) clear;
|
4) clear;
|
||||||
echo "Check for errors"
|
echo "Check for errors"
|
||||||
failcheck
|
failcheck
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
5) clear;
|
||||||
|
echo "Check in Ldap"
|
||||||
|
ldaplook
|
||||||
|
;;
|
||||||
|
|
||||||
6) clear;
|
6) clear;
|
||||||
echo "Reauthenticate realmd for Ubuntu 14"
|
echo "Reauthenticate realmd for Ubuntu 14"
|
||||||
Reauthenticate14
|
Reauthenticate14
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user