I tried these two commands and these are the results:
-----------------------------------------------------------------------------------------------------------------------
C:\Program Files\OpenLDAP>ldapsearch -H ldap://localhost:389/ -s sub -b "o=hr-ac
cess,c=tn" "(uid=a465077)" cn uid
# extended LDIF
#
# LDAPv3
# base <o=hr-access,c=tn> with scope sub
# filter: (uid=a465077)
# requesting: cn uid
#

# bellamine, hr-access, tn
dn: cn=bellamine,o=hr-access,c=tn
uid: a465077
cn: bellamine

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

C:\Program Files\OpenLDAP>
-----------------------------------------------------------------------------------------------------------------------

C:\Program Files\OpenLDAP>ldapwhoami -H ldap://localhost:389/ -D "cn=bellamine,o
=hr-access,c=tn" -w khalil2008
dn:cn=bellamine,o=hr-access,c=tn

C:\Program Files\OpenLDAP>
-----------------------------------------------------------------------------------------------------------------------

So I changed the config file:

                  <list>
                   <value>ldap://localhost:389/</value>
                  </list>
                 </property>
                 <property name="userName" 
value="cn=bellamine,o=hr_access,c=tn"/>
                 <property name="password" value="khalil2008"/>
                 <property name="baseEnvironmentProperties">

But I coulnd't log on the CAS server. 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Ströder
Sent: mardi 15 juillet 2008 14:48
To: Yale CAS mailing list
Subject: Re: Logging on problem

Bellamine, Khalil wrote:
> 
> First, I want to tell you that I'm using the openLDAP binary
> distribution for windows and like Michael told me, I created a new
> user with a uid and a password then I tried the ldapsearch and it
> works fine:
> -----------------------------------------------------------------------------------------------------------------------
> C:\Program Files\OpenLDAP>ldapsearch -b "o=hr-access,c=tn" "uid=a465077"

You should always test with the complete parameters you also will 
configure in CAS and not rely on defaults in ldap.conf.

Your example for searching the user's entry (should be in one line):
ldapsearch -H ldaps://localhost:389/ -s sub -b "o=hr-access,c=tn" 
"(uid=a465077)" cn uid

Example for binding as this user (simple bind, again in one line):
ldapwhoami -H ldaps://localhost:389/ -D "cn=bellamine,o=hr-access,c=tn" 
-w khalil2008

BTW: Normally ldaps:// is used on port 636.

>               <bean id="contextSource" 
> class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
>                <property name="urls">
>                 <list>
>                  <value>ldaps://localhost:389/</value>
>                 </list>

Are you sure that you have everything configured correctly for using 
LDAP over SSL? So try with <value>ldap://localhost:389/</value> first.

Ciao, Michael.
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to