From 5bffdc68a2f07ebe2baa002b0e043566c7a9fe04 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 27 Oct 2023 17:55:44 -0500 Subject: [PATCH] r/samba-dc: sysvolsync: Use system DNS server Forcing the PDC lookup to use localhost as the DNS server does not work when first adding a new domain controller, as the `sysvolsync` script runs before Samba starts. There isn't much advantage to using the local DNS server over the system-defined server anyway. --- roles/samba-dc/files/sysvolsync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/samba-dc/files/sysvolsync.sh b/roles/samba-dc/files/sysvolsync.sh index 6b18180..6575e08 100644 --- a/roles/samba-dc/files/sysvolsync.sh +++ b/roles/samba-dc/files/sysvolsync.sh @@ -23,7 +23,7 @@ info() { } get_pdc() { - dig @localhost +short -t srv _ldap._tcp.pdc._msdcs.$(dnsdomainname) \ + dig +short -t srv _ldap._tcp.pdc._msdcs.$(dnsdomainname) \ | sort -n \ | awk '{print $4;exit}' }