[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Query to Subschema



On Freitag, 12. Juli 2002 10:37, Frank Leprich wrote:
> hello to all,
>
> for quite a while I am working with openldap software.
> I found a tool (softerra ldap browser 2.3) which can read out the
> subschemasubentry.
>
> is it possible to do that by ldapsearch ... , or with an other
> scripttool? as well I am interested in manipulating the schema over
> scripttools.

Try the following:

ldapsearch -LLL -x -h <hostname> -b "cn=Hi,o=MyORG" -s base\ 
subschemasubentry

For OpenLDAP slapd, this yields:
dn: cn=Hi,o=MyORG
subschemaSubentry: cn=Subschema

This means, that the schema information for the entry "cn=Hi,o=MyORG" is 
stored in "cn=Subschema" (btw. slapd stores schema info for all entries 
in cn=Subschema, but (I think) there is no guarantee that this will 
never change).

Now we can do the following:

ldapsearch -x -h <hostname> -b "cn=Subschema" -s base <Type>

where <Type> is one of objectClasses, attributeTypes, matchingRules, 
ldapSyntaxes.

Hope that helps,

Hans

-- 
Hans.Aschauer@Physik.uni-muenchen.de