• Add user to group with LDAP

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #9528  by michel-openkm
 
Hi,

I have a question
WE have LDAP connection now working, but is it possible to add users in a group?
Now all user are having adminrole or userrole dependent on the login config settings.
WE have made a group (Adminrole) in the ad, and add a user to this group. But it doesn't work. We can see the Adminrole group from the AD in Openkm.
I hope you can advise us in this.
 #9552  by jllort
 
Be care roles might be case sensitive don't write Adminrole use correct groups name AdminRole and UserRole.

Can you post login-config.xml I'm interesting on taking a look on it, because It's possible you got there UserRole as default role, and I want to be ensure you're really authenticating by some role not setting by default in login-config.xml
 #9558  by michel-openkm
 
Here is or Login-config.xml
Code: Select all
  <application-policy name="OpenKM">
   <authentication>
      <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required" >
        <module-option name="java.naming.provider.url">ldap://IP adres</module-option>
        <module-option name="bindDN">CN=Login,OU=Or OU,DC=domain,DC=org</module-option> 
        <module-option name="java.naming.security.authentication">simple</module-option>
        <module-option name="bindCredential">Password</module-option>
        <module-option name="baseCtxDN">OU=or OU,DC=Domain,DC=org</module-option>
        <module-option name="baseFilter">(sAMAccountName={0})</module-option>
        <module-option name="rolesCtxDN">OU=OR OU,DC=Domain,DC=org</module-option>
        <module-option name="roleFilter">(member={1})</module-option>
        <module-option name="roleAttributeID">cn</module-option>
        <module-option name="roleAttributeIsDN">false</module-option>
        <module-option name="roleRecursion">2</module-option>
        <module-option name="searchScope">ONELEVEL_SCOPE</module-option>
        <module-option name="defaultRole">AdminRole</module-option>
      </login-module>
     </authentication>
   </application-policy>
We have changed the values for privacy reasons .
If you can see we have AdminRole in the login-config. And also in the AD.
 #9585  by jllort
 
Remote it
Code: Select all
<module-option name="defaultRole">AdminRole</module-option>
Because with it all users has AdminRole by default. Tell me if you are connecting to ldap after removing it ( you must restart jboss after changing it ).
 #9589  by michel-openkm
 
tnx it works,
But is it possible to use more than one OU? We have more users in different ou in the AD.
And is it possible to add profiles to users? That's doesn't works with LDAP.
 #9599  by jllort
 
In the case you expose there's no query for doing it directly ( I've not found any, if you found some one tell me ). In these special cases must be done a PrincipalLdapAdapter class that with program logic covers all your cases. Really it's easy to be done, but for doing yourself must install develop environment and make this simply program ( for example you can take a look the actual LdapPrincipalAdapter at http://openkm.svn.sourceforge.net/viewv ... iew=markup ).

If you're interesting in our support program contact with us at www.openkm.com/Contact

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.