Update ADconnection.sh

This commit is contained in:
PierreGode 2018-08-13 10:34:18 +02:00 committed by GitHub
parent 168c732b49
commit 7589aa4680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1013,6 +1013,30 @@ sudo aptitude install ntp adcli sssd
sudo mkdir -p /var/lib/samba/private sudo mkdir -p /var/lib/samba/private
sudo aptitude install libsss-sudo sudo aptitude install libsss-sudo
sudo systemctl enable sssd sudo systemctl enable sssd
echo "hostname is $myhost"
echo "Looking for Realms.. please wait"
DOMAIN=$(realm discover | grep -i realm.name | awk '{print $2}')
ping -c 2 $DOMAIN >/dev/null
if [ $? = 0 ]
then
clear
echo "${NUMBER}I searched for an available domain and found ${MENU}>>> $DOMAIN <<<${END}${END}"
read -p "Do you wish to use it (y/n)?" yn
case $yn in
[Yy]* ) echo "";;
[Nn]* ) echo "Please enter the domain you wish to join:"
read -r DOMAIN;;
* ) echo 'Please answer yes or no.';;
esac
else
clear
echo "${NUMBER}I searched for an available domain and found nothing, please type your domain manually below... ${END}"
echo "Please enter the domain you wish to join:"
read -r DOMAIN
fi
NetBios=$(echo $DOMAIN | cut -d '.' -f1)
clear
clear clear
DOMAIN=$( realm discover | grep -i realm-name | awk '{print $2}' ) DOMAIN=$( realm discover | grep -i realm-name | awk '{print $2}' )
echo "" echo ""