summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-08-11 16:05:11 +1000
committerAndrew Tridgell <tridge@samba.org>2011-08-12 04:00:07 +0200
commitbb6214d63440d52227ea94d1788b6875b4d4742c (patch)
tree5757525d8132afe2406d0fa94011b2b1c2e8c553 /source4/scripting
parentd79ee18f988d1f43eb1f76752e749385b9b9c251 (diff)
downloadsamba-bb6214d63440d52227ea94d1788b6875b4d4742c.tar.gz
samba-bb6214d63440d52227ea94d1788b6875b4d4742c.tar.bz2
samba-bb6214d63440d52227ea94d1788b6875b4d4742c.zip
s4-join: make dsServiceName a GUID in @ROOTDSE on join
when joining another domain as a DC we should setup our dsServiceName in @ROOTDSE to be a GUID so we can cope with later server renames Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/join.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index 4495b527b9..c24e8d6800 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -500,11 +500,13 @@ class dc_join(object):
def join_finalise(ctx):
'''finalise the join, mark us synchronised and setup secrets db'''
- print "Setting isSynchronized"
+ print "Setting isSynchronized and dsServiceName"
m = ldb.Message()
- m.dn = ldb.Dn(ctx.samdb, '@ROOTDSE')
+ m.dn = ldb.Dn(ctx.local_samdb, '@ROOTDSE')
m["isSynchronized"] = ldb.MessageElement("TRUE", ldb.FLAG_MOD_REPLACE, "isSynchronized")
- ctx.samdb.modify(m)
+ m["dsServiceName"] = ldb.MessageElement("<GUID=%s>" % str(ctx.ntds_guid),
+ ldb.FLAG_MOD_REPLACE, "dsServiceName")
+ ctx.local_samdb.modify(m)
secrets_ldb = Ldb(ctx.paths.secrets, session_info=system_session(), lp=ctx.lp)