Update ADconnection.sh

This commit is contained in:
PierreGoude 2018-02-02 13:43:35 +01:00 committed by GitHub
parent 617b5922c6
commit 7b8176bd9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,23 +110,23 @@ sudo echo "${INTRO_TEXT}"Realm= $discovery"${INTRO_TEXT}"
sudo echo "${NORMAL}${NORMAL}"
sleep 1
clear
read -p "Do you wish to select an OU? (Default is CN=Computers,DC=domain,DC=com) (y/n)?" yn
case $yn in
[Yy]* ) echo "${INTRO_TEXT}"Please type OU"${END}"
read -r OU
MyOU=$(echo $OU | cut -d '=' -f1 | awk '{print toupper($0)}')
if [ "$MyOU" = OU ]
then
echo "Setting OU: $OU"
sudo realm join --user=ADMIN --computer-ou=$OU DOMAIN
else
echo "Something went wrong. please use this format ( OU=Computers,DC=domain,DC=com )"
exit
fi;;
[Nn]* ) echo "";;
* ) echo 'Please answer yes or no.';;
esac
#read -p "Do you wish to select an OU? (Default is CN=Computers,DC=domain,DC=com) (y/n)?" yn
# case $yn in
# [Yy]* ) echo "${INTRO_TEXT}"Please type OU"${END}"
# read -r OU
#MyOU=$(echo $OU | cut -d '=' -f1 | awk '{print toupper($0)}')
#if [ "$MyOU" = OU ]
#then
#echo "Setting OU: $OU"
#sudo realm join --user=ADMIN --computer-ou=$OU DOMAIN
#else
#echo "Something went wrong. please use this format ( OU=Computers,DC=domain,DC=com )"
#exit
#fi;;
#
# [Nn]* ) echo "";;
# * ) echo 'Please answer yes or no.';;
# esac
sudo realm join -v -U $ADMIN $DOMAIN --install=/
else
if [ "$var" -eq "16" ]