summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba_spnupdate
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/bin/samba_spnupdate')
-rwxr-xr-xsource4/scripting/bin/samba_spnupdate5
1 files changed, 3 insertions, 2 deletions
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()