使用 WebSphere Application Server 管理控制台或 wsadmin 命令配置 LDAP 适配器。请参阅 WebSphere 管理控制台文档。如果需要修改此配置,您可手动编辑 wimconfig.xml 文件,尽管这不是首选方法。
以下代码样本为基本 wimconfig.xml 文件示例,此文件已配置为使用 LDAP 服务器 LDAP1。可以修改以斜体显示的相应值。
<config:repositories xsi:type="config:LdapRepositoryType" id="LDAP1" supportPaging="true"
supportSorting="true" ldapServerType="IDS">
<config:baseEntries name="cn=users,dc=yourco,dc=com"/>
<config:baseEntries name="cn=groups,dc=yourco,dc=com"/>
<config:ldapServerConfiguration>
<config:ldapServers bindDN="cn=root" bindPassword="{xor}Nj0y" sslEnabled="false">
<config:connections host="localhost" port="389"/>
</config:ldapServers>
</config:ldapServerConfiguration>
<config:ldapEntityTypes name="PersonAccount">
<config:objectClasses>inetOrgPerson</config:objectClasses>
<config:searchBases>cn=users,dc=yourco,dc=com</config:searchBases>
</config:ldapEntityTypes>
<config:ldapEntityTypes name="Group">
<config:objectClasses>groupOfNames</config:objectClasses>
<config:searchBases>cn=groups,dc=yourco,dc=com</config:searchBases>
</config:ldapEntityTypes>
<config:ldapEntityTypes name="OrgContainer">
<config:rdnAttributes name="o" objectClass="organization"/>
<config:rdnAttributes name="ou" objectClass="organizationalunit"/>
<config:objectClasses>organization</config:objectClasses>
<config:objectClasses>organizationalUnit</config:objectClasses>
</config:ldapEntityTypes>
<config:groupConfiguration>
<config:memberAttributes dummyMember="uid=dummy" name="member" objectClass="groupOfNames"/>
<config:membershipAttribute name=""/>
</config:groupConfiguration>
<config:attributeConfiguration>
<config:attributes name="userPassword" propertyName="password"/>
<config:attributes name="cn" propertyName="displayName">
<config:entityTypes>Group</config:entityTypes>
</config:attributes>
<config:attributes name="cn" propertyName="cn">
<config:entityTypes>Group</config:entityTypes>
</config:attributes>
<config:propertiesNotSupported name="homeAddress"/>
<config:propertiesNotSupported name="businessAddress"/>
</config:attributeConfiguration>
<config:contextPool enabled="true" initPoolSize="1" maxPoolSize="10"
poolTimeOut="0" prefPoolSize="5"/>
<config:cacheConfiguration>
<config:attributesCache cacheSize="4000" cacheTimeOut="1200"
enabled="true" cacheDistPolicy="none"/>
<config:searchResultsCache cacheSize="2000" cacheTimeOut="600"
enabled="true" searchResultSizeLimit="1000" cacheDistPolicy="none"/>
</config:cacheConfiguration>
</config:repositories>
有关故障诊断以及如何为 virtual member manager 启用跟踪和日志的信息,请参阅日志和跟踪。 另请参阅 WebSphere Application Server 信息中心内的将独立 LDAP 存储库迁移到联合存储库 LDAP 存储库配置。