diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/join.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/samba/join.py b/python/samba/join.py index 2a737bab3c..1785ab3e88 100644 --- a/python/samba/join.py +++ b/python/samba/join.py @@ -1193,6 +1193,10 @@ def join_subdomain(logger=None, server=None, creds=None, lp=None, site=None, ctx.samdb = SamDB(url="ldap://%s" % ctx.server, session_info=system_session(), credentials=ctx.creds, lp=ctx.lp) + res = ctx.samdb.search(base="", scope=ldb.SCOPE_BASE, attrs=['dnsHostName'], + controls=[]) + ctx.server = res[0]["dnsHostName"] + logger.info("DNS name of new naming master is %s" % ctx.server) ctx.base_dn = samba.dn_from_dns_name(dnsdomain) ctx.domsid = str(security.random_sid()) |