On 18/8/04 1:14 pm, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Bonjour, > I have a question, and if someone has the answer, it could help me a lot. > I'm using Net::ldap to make scripts that feed an ADAM directory. And among > the manipulations I do in these scripts, I add and delete fields to > existing objects in order to keep them up to date with other data sources. > And when I attempt to delete some attributes, I raise an > OBJECT_CLASS_VIOLATION error. > I understand that this error occurs when I'm trying to delete the > 'objectClass', or the 'cn' fields (just for the test), but I don't see
More generally, it means that you're removing an attribute that is required to be present according to the server's schema. According to RFC 2307 (which is the RFC defining the ipHost object class) the ipHost object class has two mandatory attributes: cn and ipHostNumber. > what's the problem with the 'c' and the 'ipHostNumber' fields, insomuch as > I can modify them... > The solution I've found, is to replace the values of these attributes with > a blank space. But I feel this is dirty. It is, because the values are meant to be IP addresses. However the RFC only uses DirectoryString so what you're doing is "OK". You might break some clients though that expect the values to be IP addresses. > To be more intelligible, i attach a track of the problem. > I will look toward the ldap schema for information, but if someone else has > a better idea, it's more than welcome. Yes, you should look at the schema. Cheers, Chris
