[Building Sakai] Sakai 2.6.3 to authenticate with LDAP server
Steve Swinsburg
steve.swinsburg at gmail.com
Sun Dec 12 16:18:32 PST 2010
From this output, it looks like your uid parameter in LDAP doesn't match your config. In jldap-beans.xml, you need to check the attributeMappings are set properly for your environment. I would say you need to change:
> <entry key="login"><value>cn</value></entry>
to
<entry key="login"><value>uid</value></entry>
and rebuild.
cheers,
Steve
On 10/12/2010, at 7:46 AM, Abdul khader wrote:
> Dear Daniel,
> Here is the error in the catalina.out I am getting. Can someone tell me what that means, Is that an issue with sakai or the ldap server ?
>
>
> 2010-12-09 12:47:10,383 DEBUG http-80-Processor24 edu.amc.sakai.user.JLDAPDirectoryProvider - searchDirectory(): [filter = cn=abdul][reusing conn = false]
> 2010-12-09 12:47:10,392 ERROR http-80-Processor24 edu.amc.sakai.user.JLDAPDirectoryProvider - getUser() failed [eid: abdul]
> LDAPException: Invalid Credentials (49) Invalid Credentials
> LDAPException: Matched DN:
> at com.novell.ldap.LDAPResponse.getResultException(Unknown Source)
> at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
> at com.novell.ldap.LDAPConnection.chkResultCode(Unknown Source)
> at com.novell.ldap.LDAPConnection.bind(Unknown Source)
> at com.novell.ldap.LDAPConnection.bind(Unknown Source)
> at edu.amc.sakai.user.SimpleLdapConnectionManager.bind(SimpleLdapConnectionManager.java:123)
> at edu.amc.sakai.user.SimpleLdapConnectionManager.getConnection(SimpleLdapConnectionManager.java:92)
> at edu.amc.sakai.user.JLDAPDirectoryProvider.searchDirectory(JLDAPDirectoryProvider.java:899)
> at edu.amc.sakai.user.JLDAPDirectoryProvider.searchDirectoryForSingleEntry(JLDAPDirectoryProvider.java:847)
> at edu.amc.sakai.user.JLDAPDirectoryProvider.getUserByEid(JLDAPDirectoryProvider.java:769)
> at edu.amc.sakai.user.JLDAPDirectoryProvider.getUserByEid(JLDAPDirectoryProvider.java:723)
>
>
> Many thanks
> Abdul Khader
> On Thu, Dec 9, 2010 at 10:38 PM, Daniel McCallum <dmccallum at unicon.net> wrote:
> Your bind DNs don't match.
>
>
> uid=root,ou=People,dc=test,dc=com
>
> vs
>
>
> cn=admin,ou=People,dc=com,dc=com
>
> Also a good idea to crank up logging while you get the config straightened out. In (sakai|local).properties:
>
> log.config.count=1
> log.config.1=DEBUG.edu.amc.sakai.user
>
> Only need to change attribute mappings if the defaults don't match your LDAP schema.
>
> - Dan
>
> Abdul khader wrote:
> Dear All,
> I have sakai 2.6.3. I would like to authenticate user's using Openldap server.
> I have followed the follow URL to configure sakai.
> http://confluence.sakaiproject.org/display/~steve.swinsburg/LDAP+in+Sakai+2.5
>
> My sakai config is as follows with reference to the http://confluence.sakaiproject.org/display/~steve.swinsburg/LDAP+in+Sakai+2.5
>
> My Ldap server details are as below
> ==========================
> database bdb
> suffix "dc=test,dc=com"
> rootdn "cn=admin,dc=test,dc=com"
>
> From the sakai server, I am able to authenticate and get user details with the following command at the linux shell.
>
> ldapsearch -x -D 'uid=root,ou=People,dc=test,dc=com' -W -H ldap://ldap.test.com <http://ldap.test.com> -b ou=People,dc=test,dc=com uid=root
>
>
>
>
> My Sakai configuration details as below
> =============================
>
> SAKAI-SRC/providers/component/pom.xml
>
> <!-- Needed for the JLDAP Provider -->
> <dependency>
>
>
> <groupId>org.sakaiproject</groupId>
> <artifactId>sakai-jldap-provider</artifactId>
> <version>2.6.3</version>
>
>
> </dependency>
>
> <dependency>
> <groupId>openldap</groupId>
> <artifactId>ldap</artifactId>
> <version>2005.03.29</version>
>
>
> </dependency>
> <!-- -->
>
> SAKAI-SRC/providers/component/src/webapp/WEB-INF/components.xml
>
> <import resource="jldap-beans.xml" />
>
>
>
>
> SAKAI-SRC/providers/component/src/webapp/WEB-INF/jldap-beans.xml
>
> <property name="ldapHost">
> <value>ldap.test.com <http://ldap.test.com></value>
>
>
>
> </property>
>
>
> <property name="basePath">
> <value>ou=People,dc=test,dc=com</value>
> </property>
>
>
> <property name="ldapUser">
>
>
> <value>cn=admin,ou=People,dc=com,dc=com</value>
> </property>
>
>
> <property name="ldapPassword">
> <value>test123</value>
> </property>
>
>
>
>
> <property name="autoBind">
> <value>true</value>
> </property>
>
>
>
> <property name="attributeMappings">
>
>
> <map>
> <entry key="login"><value>cn</value></entry>
> <entry key="distinguishedName"><value>distinguishedName</value></entry>
>
>
> <entry key="firstName"><value>givenName</value></entry>
> <entry key="lastName"><value>sn</value></entry>
>
>
> <entry key="email"><value>mail</value></entry>
> <!--
> <entry key="groupMembership"><value>groupMembership</value></entry>
>
>
> -->
> </map>
>
> NOTE : I have not changed anything in the above attributeMappings. Do I need to change some there ?
>
>
> </property>
>
>
> I do the following after the above configuration.
> cd SAKAI-SRC/providers
>
> mvn clean install sakai:deploy -Dmaven.tomcat.home=/usr/local/tomcat/
>
>
> The compilation goes well and I get the message "Build Successful"
> I start sakai and try to login with a ldap user name, but the login fails.
>
> Please help.
>
> Regards
> Abdul Khader
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20101213/4a87cdef/attachment.html
More information about the sakai-dev
mailing list