1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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>
This commit is contained in:
Andrew Bartlett 2014-08-22 17:49:06 +12:00
parent 8485cc9448
commit b9e1736216

View File

@ -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)