Lines 585-595
def password_sync_ucs_to_s4(s4connector, key, object):
|
Link Here
|
---|
|
585 |
# Usecase: LDB module on ucs_3.0-0-ucsschool slaves creates XP computers/windows in UDM without password |
585 |
# Usecase: LDB module on ucs_3.0-0-ucsschool slaves creates XP computers/windows in UDM without password |
586 |
if ucsNThash or sambaPwdLastSet: |
586 |
if ucsNThash or sambaPwdLastSet: |
587 |
pwd_set = True |
587 |
pwd_set = True |
588 |
if unicodePwd_attr: |
588 |
unicodePwd_new = binascii.a2b_hex(ucsNThash) |
589 |
modlist.append((ldap.MOD_DELETE, 'unicodePwd', unicodePwd_attr)) |
589 |
modlist.append((ldap.MOD_REPLACE, 'unicodePwd', unicodePwd_new)) |
590 |
if ucsNThash: |
|
|
591 |
unicodePwd_new = binascii.a2b_hex(ucsNThash) |
592 |
modlist.append((ldap.MOD_ADD, 'unicodePwd', unicodePwd_new)) |
593 |
|
590 |
|
594 |
if not ucsLMhash == s4LMhash: |
591 |
if not ucsLMhash == s4LMhash: |
595 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_ucs_to_s4: LM Hash S4: %s LM Hash UCS: %s" % (s4LMhash, ucsLMhash)) |
592 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_ucs_to_s4: LM Hash S4: %s LM Hash UCS: %s" % (s4LMhash, ucsLMhash)) |
Lines 603-614
def password_sync_ucs_to_s4(s4connector, key, object):
|
Link Here
|
---|
|
603 |
if pwd_set or not supplementalCredentials: |
600 |
if pwd_set or not supplementalCredentials: |
604 |
if krb5Principal: |
601 |
if krb5Principal: |
605 |
# encoding of Samba4 supplementalCredentials |
602 |
# encoding of Samba4 supplementalCredentials |
606 |
if supplementalCredentials: |
|
|
607 |
modlist.append((ldap.MOD_DELETE, 'supplementalCredentials', supplementalCredentials)) |
608 |
if krb5Key: |
603 |
if krb5Key: |
609 |
supplementalCredentials_new = calculate_supplementalCredentials(krb5Key, supplementalCredentials) |
604 |
supplementalCredentials_new = calculate_supplementalCredentials(krb5Key, supplementalCredentials) |
610 |
if supplementalCredentials_new: |
605 |
if supplementalCredentials_new: |
611 |
modlist.append((ldap.MOD_ADD, 'supplementalCredentials', supplementalCredentials_new)) |
606 |
modlist.append((ldap.MOD_REPLACE, 'supplementalCredentials', supplementalCredentials_new)) |
612 |
else: |
607 |
else: |
613 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_ucs_to_s4: no supplementalCredentials_new") |
608 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_ucs_to_s4: no supplementalCredentials_new") |
614 |
# if supplementalCredentials: |
609 |
# if supplementalCredentials: |