문제

I am using Python-LDAP module to interact with my LDAP server. How can I remove an objectClass from an entry using python-ldap? When I generated a modlist with modlist.modifyModlist({'objectClass':'inetLocalMailRecipient},{'objectClass' : ''}) , it just generates (1, 'objectClass', None) which obviously doesn't seem correct. What am I doing wrong here? I want to remove one objectClass from a given entry using python ldap.

도움이 되었습니까?

해결책

As stated by Guntram Blohm, it is not possible to delete object classes on existing objects because doing that would invalidate the schema checks that the server did when creating the object. So the way to do it will be to delete the object and create a new one. This is a property of the server and the client libraries cannot do anything about it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top