diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-08-22 17:49:06 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-09-01 00:36:42 +0200 |
commit | b9e1736216413f6583fac6948998f29531fa630d (patch) | |
tree | c23845e680878186ee325469c344136989553c16 /python/samba | |
parent | 8485cc9448f0114510f80a1ad40b50be991bbc42 (diff) | |
download | samba-b9e1736216413f6583fac6948998f29531fa630d.tar.gz samba-b9e1736216413f6583fac6948998f29531fa630d.tar.xz samba-b9e1736216413f6583fac6948998f29531fa630d.zip |
join.py: Ensure to fill in samAccountName so we get the domain$ account
Otherwise, we get a random samAccountName
Andrew Bartlett
Change-Id: I87ea532fe22c1b2d2effd52859da3b357f692b5a
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'python/samba')
-rw-r--r-- | python/samba/join.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/samba/join.py b/python/samba/join.py index 4b9fed066e..d9e5e8c0ee 100644 --- a/python/samba/join.py +++ b/python/samba/join.py @@ -1046,7 +1046,8 @@ class dc_join(object): "dn" : "cn=%s$,cn=users,%s" % (ctx.forest_domain_name, ctx.base_dn), "objectclass" : "user", "userAccountControl" : str(samba.dsdb.UF_INTERDOMAIN_TRUST_ACCOUNT), - "clearTextPassword" : ctx.trustdom_pass.encode('utf-16-le') + "clearTextPassword" : ctx.trustdom_pass.encode('utf-16-le'), + "samAccountName" : "%s$" % ctx.forest_domain_name } ctx.local_samdb.add(rec) |