From 439d7ff935f845ae381e8650e7e2b80d65e929d2 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 16 Sep 2010 16:58:18 +0200 Subject: s4:provision.py - make more use of "names.serverdn" on NTDS settings location Signed-off-by: Andrew Bartlett --- source4/scripting/python/samba/provision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 6429251850..6c2d0f1115 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -922,7 +922,7 @@ def setup_self_join(samdb, names, "DOMAINDN": names.domaindn}) # add the NTDSGUID based SPNs - ntds_dn = "CN=NTDS Settings,CN=%s,CN=Servers,CN=%s,CN=Sites,CN=Configuration,%s" % (names.hostname, names.sitename, names.domaindn) + ntds_dn = "CN=NTDS Settings,%s" % names.serverdn names.ntdsguid = samdb.searchone(basedn=ntds_dn, attribute="objectGUID", expression="", scope=ldb.SCOPE_BASE) assert isinstance(names.ntdsguid, str) @@ -1201,7 +1201,7 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp, names, domainControllerFunctionality=domainControllerFunctionality, ntdsguid=ntdsguid) - ntds_dn = "CN=NTDS Settings,CN=%s,CN=Servers,CN=%s,CN=Sites,CN=Configuration,%s" % (names.hostname, names.sitename, names.domaindn) + ntds_dn = "CN=NTDS Settings,%s" % names.serverdn names.ntdsguid = samdb.searchone(basedn=ntds_dn, attribute="objectGUID", expression="", scope=ldb.SCOPE_BASE) assert isinstance(names.ntdsguid, str) -- cgit