Advertisement

12.10.2007 at 01:00AM PST, ID: 23012510
[x]
Attachment Details

Errors when importing part of an LDAP schema from an LDIF file (Sun DS)

Asked by abel in Lightweight Directory Access Protocol (LDAP)

Tags: , , , ,

Hi Experts!

I have some trouble getting the import of an LDIF correctly. Importing user data goes fine, but when I try to import something into the "dn: cn=schema" tree, I don't seem to be able to get it right. My guess is that either

  1. It is not possible to import an LDIF schema file and I have to do it by hand, i.e., by updating 99user.ldif or adding another file to the schema directory.

  2. It is possible, but I should use another syntax. See the code snippet for the current syntax I used. This fails with "Error adding object 'dn: cn=schema'.  The error sent by the server was:

'Already exists'.  The object is: LDAPEntry: cn=schema; LDAPAttributeSet: LDAPAttribute {type='objectclasses', values='( Portal-oid NAME 'portal' SUP top STRUCTURAL MUST cn MAY ( groep $ omgeving $ omschrijving $ startRecht $ url ) X-ORIGIN 'user defined' )'} LDAPAttribute {type='objectclass', values='top,ldapSubentry,subschema'} LDAPAttribute {type='cn', values='schema'}."

After this error, the 99user.ldif does not appear updated or changed in any way.

The basic thing that I need is to automate the update of a schema, which is needed to do a controlled roll-out of a new version of our software (which needs a schema update). I can do it by hand (by changing the 99user.ldif or by using the Sun System Server Console, but I rather do it automatically (because in the end someone else will have to do it on the production server).

Btw, the same happens when I try to import an objectclass that has changed, i.e., has one added attribute (the attribute itself does exist already).Start Free Trial
1:
2:
3:
4:
5:
6:
7:
dn: cn=schema
objectClass: top
objectClass: ldapSubentry
objectClass: subschema
cn: schema
objectClasses: ( Portal-oid NAME 'portal' SUP top STRUCTURAL MUST cn MAY ( gro
 ep $ omgeving $ omschrijving $ startRecht $ url ) X-ORIGIN 'user defined' )
 
 
[+][-]12.13.2007 at 06:22PM PST, ID: 20469320

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Lightweight Directory Access Protocol (LDAP)
Tags: schema, import, ldap, ldif, sun
Sign Up Now!
Solution Provided By: Nopius
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628