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

Re: Retrieve the schema from openldap-Server

On Donnerstag, 29. August 2002 11:55, Edward W Un wrote:
> try ldapsearch:
> ldapsearch  -s  base  -b  "cn=subschema"  -x  -D  "binddn"  -W  -H
> "ldap host"  "+"
> regards
> Un
> Ingo Schaefer wrote:


> > ldapsearch -x -D <rootdn> -W "(cn=schema)"

In fact, you should do it in two steps:

1. retrieve the dn of the (sub)schema which is controlling the entry:

ldapsearch -s base -LLL -H ldap://ldaphost.myorg.com -x -b
"cn=entry,o=which I am interested in"  subschemaSubentry

For openldap, this will give you (in the default configuration):
subschemaSubentry: cn=Subschema

2. Now, you can search the schema:

ldapsearch -LLL -s base -H ldap://pygar -x -b "cn=Subschema"  <xyz>

where <xyz> is one of objectClasses, attributeTypes, matchingRules, and
ldapSyntaxes (for openldap; there may be other attributes allowed for
other servers).

Hope that helps,