ldap3 python modify replace an object with filter

后端 未结 1 1351
太阳男子
太阳男子 2021-01-26 12:54

How can we filter when applying ldapmodify?

For eg: this is how my user object looks like:

dn: mail=abc@d.com,ou=users,dc=dev,dc=com sn: po givenName: abc

相关标签:
1条回答
  • 2021-01-26 13:15

    You need to send the Assertion Control along with your modify operation (see RFC 4528). Basically the control contains a filter which has to be matched.

    I'm using this control in my web2ldap to prevent concurrent writes to do anything bad.

    I have some doubts that ldap3 module supports it out-of-the-box though.

    Further notes:

    • Not all LDAP servers support this control.
    • There are subtle bugs in LDAP server implementations supporting this control.
    0 讨论(0)
提交回复
热议问题