diff options
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/scripting/bin/samba_dnsupdate | 6 | ||||
-rwxr-xr-x | 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() |