Skip to content

modify objectclass - Object class violation  #7

Open
@halostatue

Description

@halostatue

Originally submitted by Rubyforge user cuzic4n on 2010-09-02:

I am adding and deleting all sorts of ldap entries. I can even make new entries with objectclasses, but when I want
to remove an existing one or add another one I get 'object class violation'. Before you say that the ldap server is
correct. I can do it with softerra ldap administrator just fine. They have a special menu option for adding/removing
objectclasses to existing entries.

The entry log from the ldap server when using softerra to remove posixAccount and shadowaccount objectclasses from already existing entries.

AuditV3--2010-09-02-18:36:52.865+00:00DST--V3 SSL Modify--bindDN: cn=root--client: x.x.x.x:22795--connectionID:
1943--received: 2010-09-02-18:36:52.470+00:00DST--Success
operationResponseTime: 395
timeOnWorkQ: 0
rdbmLockWaitTime: 1
clientIOTime: 0
object: cn=myname,ou=internal,O=stuff
delete: gidNumber
delete: homeDirectory
delete: loginShell
delete: shadowFlag
delete: uidNumber
delete: userid
replace: objectClass

The entry log from the ldap server when trying using net-ldap:

AuditV3--2010-09-02-18:02:34.520+00:00DST--V3 Modify--bindDN: cn=root--client: x.x.x.x:65284--connectionID: 1935--received:
2010-09-02-18:02:34.516+00:00DST--Object class violation
operationResponseTime: 4
timeOnWorkQ: 0
rdbmLockWaitTime: 0
clientIOTime: 0
object: cn=myname,ou=internal,o=stuff
delete: userid
delete: gidnumber
delete: uidnumber
delete: loginshell
delete: homedirectory
delete: objectclass

I notice they are using a replace action. I looked at the net-ldap replace api but it doesn't support this type of call.
I tried ldap.mod with ops array with even just the objectclasses listed. no luck. ldap.delete_attibute won't work for
objectclasses.. ldap.replace_attribute won't work for objectclasses..

Tried the ldap.add with the attr array for adding new objectclasses to no avail. tried ldap.add_attribute for objectclass
to no avail. tried ldap.replace_attribute for objectclass to no avail.

Is there any work being done for supporting adding/removing objectclasses to already existing entries?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions