From 717706cb9691d435071c9883b3da649fcada2ea6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Aug 2011 17:41:08 +1000 Subject: s4-dns/spn: fixed DNS and SPN scripts to setup forest DNS name --- source4/scripting/bin/samba_dnsupdate | 6 +++--- source4/scripting/bin/samba_spnupdate | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index 9f37034827..9609fe992b 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -225,9 +225,9 @@ def get_subst_vars(): samdb = SamDB(url=lp.samdb_url(), session_info=system_session(), lp=lp) - vars['DNSDOMAIN'] = lp.get('realm').lower() - vars['DNSFOREST'] = lp.get('realm').lower() - vars['HOSTNAME'] = lp.get('netbios name').lower() + "." + vars['DNSDOMAIN'] + vars['DNSDOMAIN'] = samdb.domain_dns_name() + vars['DNSFOREST'] = samdb.forest_dns_name() + vars['HOSTNAME'] = samdb.host_dns_name() vars['NTDSGUID'] = samdb.get_ntds_GUID() vars['SITE'] = samdb.server_site_name() res = samdb.search(base=samdb.get_default_basedn(), scope=SCOPE_BASE, attrs=["objectGUID"]) diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate index d99461a9fc..10da1d917b 100755 --- a/source4/scripting/bin/samba_spnupdate +++ b/source4/scripting/bin/samba_spnupdate @@ -70,8 +70,9 @@ def get_subst_vars(samdb): global lp vars = {} - vars['DNSDOMAIN'] = lp.get('realm').lower() - vars['HOSTNAME'] = lp.get('netbios name').lower() + "." + vars['DNSDOMAIN'] + vars['DNSDOMAIN'] = samdb.domain_dns_name() + vars['DNSFOREST'] = samdb.forest_dns_name() + vars['HOSTNAME'] = samdb.host_dns_name() vars['NETBIOSNAME'] = lp.get('netbios name').upper() vars['WORKGROUP'] = lp.get('workgroup') vars['NTDSGUID'] = samdb.get_ntds_GUID() -- cgit