diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-06 14:35:30 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-06 14:36:26 +1100 |
commit | 2d52eea0289e8c61282eba26b8dbb8036ca6a04b (patch) | |
tree | fa9793e885a367595764e06299697a4199c1f8f3 /source4/scripting/python | |
parent | a162b1a2d865c90441789640104adcd982e2bb75 (diff) | |
download | samba-2d52eea0289e8c61282eba26b8dbb8036ca6a04b.tar.gz samba-2d52eea0289e8c61282eba26b8dbb8036ca6a04b.tar.bz2 samba-2d52eea0289e8c61282eba26b8dbb8036ca6a04b.zip |
s4-join: fixed SPNs, invocationId and dnshostname and python join
- we need the GN/ SPN for replication.
- fixed the string form of the invocationId
- lowercase the dnshostname
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/join.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py index d57eb58fb5..7d3b6f2f0c 100644 --- a/source4/scripting/python/samba/join.py +++ b/source4/scripting/python/samba/join.py @@ -85,7 +85,7 @@ class dc_join: ctx.dnsdomain = ldb.Dn(ctx.samdb, ctx.base_dn).canonical_str().split('/')[0] ctx.realm = ctx.dnsdomain - ctx.dnshostname = "%s.%s" % (ctx.myname, ctx.dnsdomain) + ctx.dnshostname = "%s.%s" % (ctx.myname.lower(), ctx.dnsdomain) ctx.acct_dn = "CN=%s,OU=Domain Controllers,%s" % (ctx.myname, ctx.base_dn) @@ -93,7 +93,8 @@ class dc_join: ctx.tmp_samdb = None ctx.SPNs = [ "HOST/%s" % ctx.myname, - "HOST/%s" % ctx.dnshostname ] + "HOST/%s" % ctx.dnshostname, + "GC/%s/%s" % (ctx.dnshostname, ctx.dnsdomain) ] # these elements are optional ctx.never_reveal_sid = None @@ -319,7 +320,7 @@ class dc_join: rec["HasMasterNCs"] = [ ctx.base_dn, ctx.config_dn, ctx.schema_dn ] rec["msDS-HasMasterNCs"] = [ ctx.base_dn, ctx.config_dn, ctx.schema_dn ] rec["options"] = "1" - rec["invocationId"] = str(uuid.uuid4()) + rec["invocationId"] = ndr_pack(misc.GUID(str(uuid.uuid4()))) ctx.DsAddEntry(rec) # find the GUID of our NTDS DN |