Update ad-join-script.sh

Add DNS auto registration
This commit is contained in:
jeanGaston 2024-03-01 13:10:09 +01:00 committed by GitHub
parent 1c6eecdaec
commit 3c9d166aad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,8 +41,9 @@ echo "Discovering the domain..."
realm discover $domain_name
# Join the domain using the provided information
echo "Joining the domain..."
echo $admin_password | realm join -U $admin_user $domain_name
echo "Joining the domain and registering DNS..."
echo $admin_password | realm join --user=$admin_user --computer-ou=OU=Computers,DC=$domain_name --os-name=AlmaLinux --os-version=8 $domain_name
# Modify the sssd.conf configuration
echo "Modifying sssd.conf..."