mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
s4:join python code - write the SAM account name correctly
It is easier for the comprehension Reviewed-By: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
4cf9923b09
commit
36e5526685
@ -147,12 +147,12 @@ class dc_join(object):
|
|||||||
'''remove any DNs from a previous join'''
|
'''remove any DNs from a previous join'''
|
||||||
try:
|
try:
|
||||||
# find the krbtgt link
|
# find the krbtgt link
|
||||||
print("checking samaccountname")
|
print("checking sAMAccountName")
|
||||||
if ctx.subdomain:
|
if ctx.subdomain:
|
||||||
res = None
|
res = None
|
||||||
else:
|
else:
|
||||||
res = ctx.samdb.search(base=ctx.samdb.get_default_basedn(),
|
res = ctx.samdb.search(base=ctx.samdb.get_default_basedn(),
|
||||||
expression='samAccountName=%s' % ldb.binary_encode(ctx.samname),
|
expression='sAMAccountName=%s' % ldb.binary_encode(ctx.samname),
|
||||||
attrs=["msDS-krbTgtLink"])
|
attrs=["msDS-krbTgtLink"])
|
||||||
if res:
|
if res:
|
||||||
ctx.del_noerror(res[0].dn, recursive=True)
|
ctx.del_noerror(res[0].dn, recursive=True)
|
||||||
|
Reference in New Issue
Block a user