ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/dirserv4.htm

63 lines
2.2 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Accessing Schema Information</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>Accessing Schema Information</h2>
<p>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<SUP>(R)</SUP> SecureWay<SUP>(R)</SUP>
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:</p>
<pre>
ldapsearch -V 3 -h <em>hostname</em> -p <em>port</em>
-s base -b "" "objectClass=*" subschemaSubentry
</pre>
The subschemasubentry on SecureWay directories is cn=schema by default. To
retrieve the schema itself, search on the subschemasubentry entry, as follows:
<pre>
ldapsearch -V 3 -h <em>hostname</em> -p <em>port</em>
-s base -b "<em>cn=schema</em>" "objectclass=*"
</pre>
<p>The "-V 3" option is used to force ldapsearch to bind as an LDAP V3
application.</p>
<br>
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center">
<a href="dirserv1.htm">Directory Server APIs</a> |
<a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</center>
</body>
</html>