mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Update ADconnection.sh
This commit is contained in:
parent
91e577314f
commit
9014aef1cd
@ -906,7 +906,10 @@ export HOSTNAME
|
||||
myhost=$( hostname )
|
||||
yum -y install realmd sssd oddjob oddjob-mkhomedir adcli samba-common-tools samba-common
|
||||
yum -y install ipa-client
|
||||
echo "Looking for domains..."
|
||||
DOMAIN=$(realm discover | grep -i realm-name | awk '{print $2}')
|
||||
if [ -n "$DOMAIN" ]
|
||||
then
|
||||
ping -c 1 $DOMAIN
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
@ -927,6 +930,14 @@ read -p "Do you wish to use it (y/n)?" yn
|
||||
esac
|
||||
else
|
||||
clear
|
||||
echo "I searched for an available domain and found $DOMAIN but it is not responding to ping, please type your domain manually below... "
|
||||
echo "Please enter the domain you wish to join:"
|
||||
read -r DOMAIN
|
||||
echo "I Please enter AD admin user "
|
||||
read -r ADMIN
|
||||
fi
|
||||
else
|
||||
clear
|
||||
echo "I searched for an available domain and found nothing, please type your domain manually below... "
|
||||
echo "Please enter the domain you wish to join:"
|
||||
read -r DOMAIN
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user