(ldap.MOD_ADD, 'ntUserDomainId', uid)] ds.modify_s(ent.dn, mod) time.sleep(1) print "Added ntuser, changing telephonenumber . . ." mod = [(ldap.MOD_DELETE, 'telephoneNumber', telnum1), (ldap.MOD_ADD, 'telephoneNumber', telnum2)] ds.modify_s(ent.dn, mod) time.sleep(1) print "changed telephonenumber, changing description . . ." mod = [(ldap.MOD_ADD, 'description', 'test bug471068')] ds.modify_s(ent.dn, mod) time.sleep(1) print "Delete description in AD, then in DS . . ." mod = [(ldap.MOD_DELETE, 'description', None)] ad.modify_s(adent.dn, mod) ds.modify_s(ent.dn, mod) time.sleep(1) print "Add description in AD, then in DS . . ." mod = [(ldap.MOD_ADD, 'description', 'test bug471068')] ad.modify_s(adent.dn, mod) ds.modify_s(ent.dn, mod) time.sleep(1) print "Now compare the entries . . ." ents = ds.search_s(suffix, scope, "(uid=%s)" % uid) print "DS Entry: ", str(ents[0]) ents = ad.search_s(suffix, scope, "(samaccountname=%s)" % uid) print "AD Entry: ", str(ents[0])