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
14b0bbe7fe
commit
e301510cfe
@ -154,28 +154,28 @@ else
|
|||||||
# esac
|
# esac
|
||||||
sudo realm join --verbose --user=$ADMIN $DOMAIN
|
sudo realm join --verbose --user=$ADMIN $DOMAIN
|
||||||
else
|
else
|
||||||
if [ "$var" -eq "17" ]
|
if [ "$var" -eq "17" ] || [ "$var" -eq "18" ]
|
||||||
then
|
then
|
||||||
echo "${INTRO_TEXT}"Detecting Ubuntu $var"${END}"
|
echo "${INTRO_TEXT}"Detecting Ubuntu $var"${END}"
|
||||||
sleep 1
|
sleep 1
|
||||||
clear
|
clear
|
||||||
read -p "Do you wish to select an OU? (Default is CN=Computers,DC=domain,DC=com) (y/n)?" yn
|
# read -p "Do you wish to select an OU? (Default is CN=Computers,DC=domain,DC=com) (y/n)?" yn
|
||||||
case $yn in
|
# case $yn in
|
||||||
[Yy]* ) echo "${INTRO_TEXT}"Please type OU"${END}"
|
# [Yy]* ) echo "${INTRO_TEXT}"Please type OU"${END}"
|
||||||
read -r OU
|
# read -r OU
|
||||||
MyOU=$(echo $OU | cut -d '=' -f1 | awk '{print toupper($0)}')
|
#MyOU=$(echo $OU | cut -d '=' -f1 | awk '{print toupper($0)}')
|
||||||
if [ "$MyOU" = OU ]
|
#if [ "$MyOU" = OU ]
|
||||||
then
|
#then
|
||||||
echo "Setting OU: $OU"
|
#echo "Setting OU: $OU"
|
||||||
sudo realm join --user=ADMIN --computer-ou=$OU DOMAIN
|
#sudo realm join --user=ADMIN --computer-ou=$OU DOMAIN
|
||||||
else
|
#else
|
||||||
echo "Something went wrong. please use this format ( OU=Computers,DC=domain,DC=com )"
|
#echo "Something went wrong. please use this format ( OU=Computers,DC=domain,DC=com )"
|
||||||
exit
|
#exit
|
||||||
fi;;
|
#fi;;
|
||||||
|
#
|
||||||
[Nn]* ) echo "";;
|
# [Nn]* ) echo "";;
|
||||||
* ) echo 'Please answer yes or no.';;
|
# * ) echo 'Please answer yes or no.';;
|
||||||
esac
|
# esac
|
||||||
sudo realm join --verbose --user=$ADMIN $DOMAIN --install=/
|
sudo realm join --verbose --user=$ADMIN $DOMAIN --install=/
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user