mirror of
https://github.com/samba-team/samba.git
synced 2025-07-31 20:22:15 +03:00
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>
This commit is contained in:
@ -500,11 +500,13 @@ class dc_join(object):
|
|||||||
def join_finalise(ctx):
|
def join_finalise(ctx):
|
||||||
'''finalise the join, mark us synchronised and setup secrets db'''
|
'''finalise the join, mark us synchronised and setup secrets db'''
|
||||||
|
|
||||||
print "Setting isSynchronized"
|
print "Setting isSynchronized and dsServiceName"
|
||||||
m = ldb.Message()
|
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")
|
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)
|
secrets_ldb = Ldb(ctx.paths.secrets, session_info=system_session(), lp=ctx.lp)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user