diff --git a/ad-join-script.sh b/ad-join-script.sh index 746f853..efa60f7 100644 --- a/ad-join-script.sh +++ b/ad-join-script.sh @@ -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..."