<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
jboss ldapextloginmodule
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/rasha123">rasha k</a> in <i>Beginner's Corner</i> - <a href="https://community.jboss.org/message/733378#733378">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>hi , </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>im not sure if this is the right place to ask, if not plz direct me,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>im trying to authinticate jboss with active directory and i did this login file</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  </p><p>application-policy name="OpenKM"> </p><p>     <authentication> </p><p>         <login-module flag="required" code="org.jboss.security.auth.spi.LdapExtLoginModule"> </p><p>             <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option> </p><p>          <module-option name="java.naming.provider.url">ldap://10.100.xx.xx:389/</module-option> </p><p>          <module-option name="java.naming.security.authentication">simple</module-option> </p><p>          <module-option name="bindDN">xxx\Admin</module-option> </p><p>          <module-option name="bindCredential">password</module-option> </p><p>          <module-option name="baseCtxDN">ou=user,dc=xxx,dc=local</module-option> </p><p>          <module-option name="baseFilter">(sAMAccountName={0})</module-option> </p><p>          <module-option name="rolesCtxDN">ou=user,dc=xxx,dc=local</module-option> </p><p>          <module-option name="roleFilter">(member={1})</module-option> </p><p>          <module-option name="roleAttributeIsDN">true</module-option> </p><p>          <module-option name="roleNameAttributeID">name</module-option> </p><p>          <module-option name="java.naming.referral">follow</module-option> </p><p>        </login-module> </p><p>     </authentication> </p><p></application-policy> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>and this is my configuration file</p><dl class="codebox"><dd><code>system.login.lowercase=on<br/>principal.adapter=com.openkm.principal.LdapPrincipalAdapter <br/><br/><br/>principal.ldap.server=ldap://10.100.200.91:389/ <br/><br/>principal.ldap.security.principal=CN=Admin,ou=user,dc=xx,dc=local <br/><br/>principal.ldap.security.credentials=password <br/><br/>principal.ldap.user.search.base=ou=user,dc=xxx,dc=local <br/><br/>principal.ldap.user.search.filter=(objectclass=person) <br/><br/>principal.ldap.user.attribute=sAMAccountName <br/><br/><br/><br/>principal.ldap.role.search.base=ou=xxx,dc=xxx,dc=local <br/><br/>principal.ldap.role.search.filter=(jectcoblass=group) <br/><br/><br/>principal.ldap.role.attribute=cn <br/><br/><br/><br/><br/>principal.ldap.mail.search.base=cn={0},ou=xxx,dc=xxx,dc=local <br/><br/>principal.ldap.mail.search.filter=(&(objectclass=person)(sAMAccountName={0})) <br/><br/><br/>principal.ldap.mail.attribute=mail <br/><br/>principal.ldap.users.by.role.search.base=ou=xxxx,dc=xxx,dc=local <br/><br/><br/>principal.ldap.users.by.role.search.filter=(objectclass=group) <br/><br/>principal.ldap.users.by.role.attribute=member <br/><br/>principal.ldap.roles.by.user.search.base=ou=xxxx,dc=xxx,dc=local <br/><br/><br/>principal.ldap.roles.by.user.search.filter=(&(objectclass=person)(sAMAccountName={0})) <br/><br/><br/>principal.ldap.roles.by.user.attribute=memberOf <br/><br/></code></dd></dl><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>i can succesfully login with active directory user but the ploblem that all users and roles are not imported to openkm!!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>my active directory dn is</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>"cn= user1, CN=group1,OU=xxx,DC=xxxx,DC=local"</p><p>"cn= user2,CN=group2,OU=xxx,DC=xxxx,DC=local"</p><p>"cn= user3,CN=group3,OU=xxx,DC=xxxx,DC=local"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>where users and roles (groups) under OU </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>i m not sure if my mistake is in the configuring of roles ands users ?!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>any help <span> :( </span> </p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/733378#733378">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>