From a5e4c4520af9f7a99aac4117d1225c85b891554d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 16 Sep 2013 10:23:07 -0700 Subject: samba-tool domain join subdomain: Set "reveal_internals:0" control so we can see the ncName The issue here is that we create the ncName remotely with DsAddEntry, and then replicate it back. However, at this point the naming context pointed at by the ncName does not exist! The issue is that the extended_dn_out module then hides the link, because it points to a missing object. The reveal_internals control forces this link to be returned, and so we can then find the GUID, to create the domain with the right GUID. Andrew Bartlett Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher --- python/samba/join.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/samba/join.py b/python/samba/join.py index 7c14c2adb9..ff0fe3bdfb 100644 --- a/python/samba/join.py +++ b/python/samba/join.py @@ -747,7 +747,7 @@ class dc_join(object): print("Finding domain GUID from ncName") res = ctx.local_samdb.search(base=ctx.partition_dn, scope=ldb.SCOPE_BASE, attrs=['ncName'], - controls=["extended_dn:1:1"]) + controls=["extended_dn:1:1", "reveal_internals:0"]) domguid = str(misc.GUID(ldb.Dn(ctx.samdb, res[0]['ncName'][0]).get_extended_component('GUID'))) print("Got domain GUID %s" % domguid) -- cgit