LDAP authentication for a user

Gavin Carr gavin at openfusion.com.au
Fri Dec 28 20:06:55 UTC 2007

On Fri, Dec 28, 2007 at 08:08:52PM +0530, Rajesh Dharmalingam wrote:
> Hi,
> I have a user who needs to be authenticated:
> The ldap schema looks as below:
> dn: cn=a, cn=authenticated users, cn=abc, o=a1.com
> authenticationuserpassword: ****
> userPassword:: #######
> description: test
> objectClass: top
> objectClass: authenticationuser
> cn: a

That's one weird schema!

> As mentioned below, I provided in the djabberd conf file, and tried to login
> using the user a but the result is - user is not found...
>  <Plugin DJabberd::Authen::LDAP>
>         LDAPURI             ldap://ip:port/
>         LDAPBindDN       o=a1.com
>         LDAPBindPW      ****
>         LDAPBaseDN      cn=authenticated users,cn=abc,o=a1.com
>        LDAPFilter            (cn=%u)
>   </Plugin>
> When i give the same from a ldap browser as below, i am able to find the dn
> for this user
> Search dn: cn=authenticated users,cn=abc,o=a1.com
> Filter: cn = a
> I get the dn for this user.
> I tried with adding scope as 'sub' in the ldap plugin which gives the same
> result.
> One more thing is, SSL is required for ldap. so i did the required changes
> to the ldap plugin in djabberd and tried. I am getting the same result that
> "account a not found"..
> Can you provide some input?

This is just an issue of finding the right Net::LDAP incantation 
for your schema. Try creating a minimal test script based on the 
Net::LDAP parts of DJabberd::Authen::LDAP, and use that to debug 
the Net::LDAP interaction.


More information about the Djabberd mailing list