Bonjour Yves-Marie,
 The c attribute is a mandatory attribute of the country objectClass and
ipHostNumber is a mandatory attribute of the ipHost objectClass. If an
object has an auxiliary objectClass of ipHost it *must* have a value for
the ipHostNumber attribute (and ditto for country and c). Therefore to
remove these attributes and still have a valid object you must also
remove the relevant objectClass. 

So you can have this entry:

dn: CN=04142,OU=FILIALES,O=MOUSQUETAIRES
ipHostNumber: 10.18.46.0
sn: CATHERINE VANNEY
objectClass: top
objectClass: ipHost
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: 04142

and to remove the ipHostNumber you need to modify the entry to:

dn: CN=04142,OU=FILIALES,O=MOUSQUETAIRES
sn: CATHERINE VANNEY
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: 04142

HTH.

Paul.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 1/17/8859 11:00:00 PM
To: [EMAIL PROTECTED]
Subject: Error when deleting fields...


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
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.
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.

Yves-Marie Lain�

Before
------------------------------------------------------------------------
dn:CN=04142,OU=FILIALES,O=MOUSQUETAIRES

givenName:     VANNEY
title:         02
cirLogAct:     108
cirLogFut:     108
departmentNumber: 022
ipHostNumber:  10.18.46.0
datCadenc:     20040518
sn:       CATHERINE VANNEY
objectClass:   top
          stimeFiliale
          country
          ipHost
          person
          organizationalPerson
          inetOrgPerson
cn:       04142
c:        FR
st:       004
ou:       INTERMARCHE
description:   KOS
telephoneNumber: 02969120
telexNumber:
acsimileTelephoneNumber: 02969124
distinguishedName: CN=04142,OU=FILIALES,O=MOUSQUETAIRES
instanceType: 4
whenCreated: 20040329095514.0Z
whenChanged: 20040817142458.0Z
uSNCreated: 13018
uSNChanged: 765975
name: 04142
objectGUID: �b���H�J�t9� �(Qv
objectCategory: CN=inetOrgPerson,CN=Schema,CN=Configuration,CN
={0C441468-067E-443F-A83B-1953EC6A9D41}

Attempt to delete 'objectClass' field              :
LDAP_OBJECT_CLASS_VIOLATION
Attempt to delete 'description' field              : LDAP_SUCCESS
Attempt to delete 'sn' field                  : LDAP_SUCCESS
Attempt to delete 'givenName' field           : LDAP_SUCCESS
Attempt to delete 'ou' field                  : LDAP_SUCCESS
Attempt to delete 'c' field                   :
LDAP_OBJECT_CLASS_VIOLATION
Attempt to delete 'cn' field                  : LDAP_NOT_ALLOWED_ON_RDN
Attempt to delete 'st' field                  : LDAP_SUCCESS
Attempt to delete 'departmentNumber' field         : LDAP_SUCCESS
Attempt to delete 'title' field                    : LDAP_SUCCESS
Attempt to delete 'ipHostNumber' field             :
LDAP_OBJECT_CLASS_VIOLATION
Attempt to delete 'telephoneNumber' field          : LDAP_SUCCESS
Attempt to delete 'telexNumber' field              : LDAP_SUCCESS
Attempt to delete 'facsimileTelephoneNumber' field    : LDAP_SUCCESS
Attempt to delete 'cirLogAct' field           : LDAP_SUCCESS
Attempt to delete 'cirLogFut' field           : LDAP_SUCCESS
Attempt to delete 'datCadenc' field           : LDAP_SUCCESS


After
------------------------------------------------------------------------
dn:CN=04142,OU=FILIALES,O=MOUSQUETAIRES

ipHostNumber: 10.18.46.0
objectClass:   top
          stimeFiliale
          country
          ipHost
          person
          organizationalPerson
          inetOrgPerson
cn: 04142
c: FR
istinguishedName: CN=04142,OU=FILIALES,O=MOUSQUETAIRES
instanceType: 4
whenCreated: 20040329095514.0Z
whenChanged: 20040818095726.0Z
uSNCreated: 13018
uSNChanged: 859470
name: 04142
objectGUID: �b���H�J�t9� �(Qv
objectCategory: CN=inetOrgPerson,CN=Schema,CN=Configuration,CN
={0C441468-067E-443F-A83B-1953EC6A9D41}


************************************************************************
*****

Tout usage de ce message par une personne autre que son destinataire

est strictement interdit. L'integrite de ce message n'etant pas assuree

sur Internet, Le groupement des Mousquetaires ne peut etre tenu
responsable

de son contenu.

Toute utilisation ou diffusion non autorisee est interdite. Si vous

n'etes pas destinataire de ce message, merci de le detruire et d'avertir

l'expediteur

************************************************************************
***** 


Reply via email to