Accessing Schema Information

LDAP V3 servers permit applications to access schema and other related information. For example, the ldapsearch utility can be used to obtain the subschemasubentry, attributeTypes, and objectClasses from IBM(R) SecureWay(R) Directory Server. First use ldapsearch to get the root DSE to find the entry containing the schema (called the subschemasubentry) for the server, as follows:

ldapsearch -V 3 -h hostname -p port 
           -s base -b "" "objectClass=*" subschemaSubentry
The subschemasubentry on SecureWay directories is cn=schema by default. To retrieve the schema itself, search on the subschemasubentry entry, as follows:
ldapsearch -V 3 -h hostname -p port 
           -s base -b "cn=schema" "objectclass=*"

The "-V 3" option is used to force ldapsearch to bind as an LDAP V3 application.



Directory Server APIs | APIs by category