directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Willeke <...@willeke.com>
Subject Re: Adding custom .schema files
Date Mon, 16 Apr 2012 12:31:56 GMT
I have never seen a schema ldif file that looks like that.
The format that I have always used is:

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.5923.1.1.1.1
 NAME 'eduPersonAffiliation'
 DESC 'eduPerson per Internet2 and EDUCAUSE'
 EQUALITY caseIgnoreMatch
 SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
attributetypes: ( 1.3.6.1.4.1.5923.1.1.1.2
 NAME 'eduPersonNickname'
 DESC 'eduPerson per Internet2 and EDUCAUSE'
 EQUALITY caseIgnoreMatch
 SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
attributetypes: ( 1.3.6.1.4.1.5923.1.1.1.3

(lot more items omitted)

add: objectclasses
objectclasses: ( 1.3.6.1.4.1.5923.1.1.2
 NAME 'eduPerson'
 AUXILIARY
 MAY ( eduPersonAffiliation $ eduPersonNickname $
 eduPersonOrgDN $ eduPersonOrgUnitDN $
 eduPersonPrimaryAffiliation $ eduPersonPrincipalName $
 eduPersonEntitlement $ eduPersonPrimaryOrgUnitDN
 ))
-

A search similar to this should retrieve the schema in an appropriate
manner.

ldapsearch -H ldap://ldapHost:389 -x -D "cn=admin,ou=Services,o=..." -W -b
"cn=schema" -s base -a always -z 100000 "(objectClass=*)" "attributetypes"
"objectclasses" "objectClass"

The -b should be determined from reading the "subschemaSubentry" form the
RootDSE of the LADP server.

--
-jim
Jim Willeke


2012/4/16 لسٹ शिराज़ <shiraz.lists@googlemail.com>

> I do not think the schema has any dependencies, as it does not have any
> m-dependencies attribute within. For more insight the logs have been
> pasted:
>
> server console log: http://pastebin.com/RDEshSuY
>
> the ldif, generated from openldap schema: http://pastebin.com/QmBUxph5
>
> and the import log: http://pastebin.com/2aVs6f9c
>
> Many Thanks,
> Shiraz
>
> On Mon, Apr 16, 2012 at 12:05 PM, Kiran Ayyagari <kayyagari@apache.org
> >wrote:
>
> > 2012/4/16 لسٹ शिराज़ <shiraz.lists@googlemail.com>:
> > > Hi Kiran,
> > >
> > > Thanks for the reply and also helped a bit.
> > >
> > > I have imported the openldap schema file and exported as apache-ldap
> ldif
> > > schema with the schema editors. Thereafter tried to import into the DIT
> > > with LDAP browser while running the apacheds in parallel, however
> > > encountered several errors of similar type on console (server side),
> i.e.
> > >
> > > [11:37:40] ERROR
> > > [org.apache.directory.server.core.schema.SchemaInterceptor] - ERR_59
> > Cannot
> > > have a superior which does not exist
> > >
> > looks like some ObjectClasses in your schema are missing
> > OR
> > if your schema depends on any other schemas that are already present
> > in server but not enabled
> > at the time of loading. To fix this set the 'm-disabled' value to
> > FALSE on that schema entry
> > e.x if your schema depends on mozilla schema
> > then goto the entry with DN cn=mozilla,ou=schema
> > and change the value of 'm-disabled' to FALSE
> >
> > > Apart from that, I have also noticed the difference in number of
> classes
> > > and attributes being shown in the schema editor (315 attributes, 36
> > > classes) and imported schema in the ldap browser (109 attributes, 2
> > > classes). This is probably due to the failures while importing the
> > schema.
> > >
> > > Any help would be highly appreciated.
> > >
> > > Shiraz
> > >
> > > On Fri, Apr 13, 2012 at 4:51 PM, Kiran Ayyagari <kayyagari@apache.org
> > >wrote:
> > >
> > >> you cannot add .schema files directly, use Apache Directory Studio to
> > >> convert them to
> > >> Apache Directory Server's schema file (which is in LDIF) and then
> > >> import into the server
> > >> again using Studio
> > >>
> > >> 2012/4/13 لسٹ शिराज़ <shiraz.lists@googlemail.com>:
> > >> > Dear Group Members,
> > >> >
> > >> > I would really be grateful if you have any hints to include *.schema
> > >> files
> > >> > in the apache ds (not necessarily in the embedded version).
> > >> >
> > >> > Many thanks,
> > >> > Shiraz
> > >> >
> > >> > 2012/4/12 لسٹ शिराज़ <shiraz.lists@googlemail.com>
> > >> >
> > >> >> Hi,
> > >> >>
> > >> >> I am very new to ApacheDS (ads), in fact to the LDAP world. I
have
> an
> > >> >> application running the embedded ads server taken from
> > >> >>
> > >> >>
> > >> >>
> > >>
> >
> http://svn.apache.org/repos/asf/directory/documentation/samples/trunk/embedded-sample/src/main/java/org/apache/directory/seserver/EmbeddedADSVer157.java
> > >> >>
> > >> >> Now I wonder if the following .schema file - which contains many
of
> > the
> > >> >> following classes and attributes, could be loaded into the embedded
> > ads?
> > >> >>
> > >> >>
> > >> >> ====Begin====
> > >> >> .........
> > >> >> ...
> > >> >> attributetype ( 1.3.6.1.4.1.6757.100.1.1.5.2.4
> > >> >>         NAME 'GLUE2ExtensionEntityForeignKey'
> > >> >>         DESC 'ForeignKey'
> > >> >>         EQUALITY caseExactIA5Match
> > >> >>         SUBSTR caseExactIA5SubstringsMatch
> > >> >>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
> > >> >>  )
> > >> >>
> > >> >> objectclass ( 1.3.6.1.4.1.6757.100.1.1.5.2
> > >> >>         NAME 'GLUE2Extension'
> > >> >>         DESC 'A key/value pair enabling the association of extra
> > >> >> information'
> > >> >>         STRUCTURAL
> > >> >>         MUST ( GLUE2ExtensionLocalId $ GLUE2ExtensionKey $
> > >> >> GLUE2ExtensionValue
> > >> >>  $ GLUE2ExtensionEntityForeignKey )
> > >> >>  )
> > >> >>
> > >> >> ......
> > >> >> ....
> > >> >> ====End=====
> > >> >>
> > >> >>
> > >> >> Secondly do you suggest any developer reference (e.g. book) which
I
> > can
> > >> >> use to create the desired application?
> > >> >>
> > >> >> Thanks in advance,
> > >> >>
> > >> >> --
> > >> >> Shiraz
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >> > --
> > >> > Cheers,
> > >> > Shiraz
> > >>
> > >>
> > >>
> > >> --
> > >> Kiran Ayyagari
> > >>
> > >
> > >
> > >
> > > --
> > > Cheers,
> > > Shiraz
> >
> >
> >
> > --
> > Kiran Ayyagari
> >
>
>
>
> --
> Cheers,
> Shiraz
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message