How to modify ou? in python-ldap

problem description

when using python-ldap, there is a problem that you need to modify ou. Looking at the official python-ldap documentation, you can find that the function of rename_s () can solve this problem, but the ldap version used on the server does not support this operation.
thought that you can use search () to find user information, delete the user information under the original ou, and then use add () to add the user information to the new ou, but when you encounter a problem,: search () cannot find the attribute userpassword.

the environmental background of the problems and what methods you have tried

openldap version: openldap-2.4.44-15.el7_5.x86_64
python version: 2.7.5

related codes

/ / Please paste the code text below (do not replace the code with pictures)

def change_group(self, dn, newrdn, newsuperior=None, delold = 1):
    """
    -sharp
    :param dn:
    :param newrdn:
    :param newsuperior:
    :param delold:
    :return:
    """
    dn_list = dn.split(",")
    newsup_list = newsuperior.split(",")

    if dn_list[1].strip() == newsup_list[0].strip():
        return
    try:
        result = self.ldap_obj.rename_s(dn, newrdn, newsuperior, delold)
        print result
    except ldap.LDAPError, error_message:
        print error_message
        return False, []
    else:
        authority_str = ""
        if (dn_list[1].strip() == "ou=Users") and (newsup_list[0].strip() == "ou=Admins"):
            authority_str = "TRUE"
        elif (dn_list[1].strip() == "ou=Admins") and (newsup_list[0].strip() == "ou=Users"):
            authority_str = "FALSE"
        -sharp  authoritytouser
        attr_list = [(ldap.MOD_REPLACE, "authoritytouser", authority_str)]
        b, result = self.modify_user(dn,  attr_list)
        return b, result

what result do you expect? What is the error message actually seen?

error in using rename_s ():
{"info": u"cannot rename between DSAs"," desc": u"Operation affects multiple DSAs"}

Apr.08,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf28c7-31e0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf28c7-31e0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?