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® SecureWay® 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=*" subschemaSubentryThe 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.
[ Back to top | LDAP APIs | APIs by category ]