List Info

Thread: LDAP authentication for a user




LDAP authentication for a user
user name
2007-12-28 08:38:52

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

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>
&nbsp; &nbsp; &nbsp;   LDAPURI &nbsp;   ; &nbsp; &nbsp; &nbsp;  ldap://ip:port/
&nbsp; &nbsp; &nbsp;   LDAPBindDN&nbsp; &nbsp; &nbsp;  o=a1.com
  ; &nbsp; &nbsp;  LDAPBindPW&nbsp;   ;  ****
&nbsp; &nbsp; &nbsp;   LDAPBaseDN  ; &nbsp;  cn=authenticated users,cn=abc,o=a1.com
  ; &nbsp; &nbsp; LDAPFilter &nbsp;   ; &nbsp; &nbsp; &nbsp; (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&#39; 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 &quot;account a not found";..

Can you provide some input?

Regards,
-Rajesh

Re: LDAP authentication for a user
user name
2007-12-28 14:06:55
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.

Cheers,
Gavin


Re: LDAP authentication for a user
user name
2007-12-31 00:18:09
Hi,

I made the authentication work for the previous post. Now, i am facing with one more problem with the following schema:

dn: cn=rajeshtest, cn=authenticated users, cn=abc, o=rajesh.com
authenticationuserpassword: rajeshtest
defaultcontext: o=test,cn=abc,o=rajesh.com
userPassword:: rajeshtest
description: rajeshtest
objectClass: top
objectClass: authenticationuser
cn: rajeshtest

configuration file:
&nbsp; <Plugin DJabberd::Authen::LDAP>
&nbsp; &nbsp; &nbsp;   LDAPURI &nbsp;   ; &nbsp; &nbsp; &nbsp;  ldaps://ip:port/
&nbsp; &nbsp;   ;  LDAPBindDN&nbsp; &nbsp; &nbsp;  o=rajesh.com
 &nbsp;   ; &nbsp; LDAPBindPW &nbsp; &nbsp;  ****
&nbsp; &nbsp; &nbsp;   LDAPBaseDN  ; &nbsp;  cn=authenticated users,cn=abc,o=rajesh.com
 &nbsp;   ;  LDAPFilter&nbsp; &nbsp; &nbsp;   ; &nbsp;  (cn=%u)
&nbsp; </Plugin>

ldap change:
&nbsp; &nbsp;  In ldap search, included the scope as sub for searching.

When i try to authenticate this user with the above mentioned configuration/changes, I am not able to login? Is there anything i need to include in filter or in base dn. Basic difference between the previous schema and this schema is, i have a default context.

Thanks and Regards,
-Rajesh

On Dec 28, 2007 8:08 PM, Rajesh Dharmalingam < rajesh.dharmalingamgmail.com">rajesh.dharmalingamgmail.com> 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

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>
&nbsp; &nbsp; &nbsp;   LDAPURI &nbsp;   ; &nbsp; &nbsp; &nbsp;  ldap://ip:port/
&nbsp; &nbsp; &nbsp;   LDAPBindDN&nbsp; &nbsp; &nbsp;  o=a1.com
  ; &nbsp; &nbsp;  LDAPBindPW&nbsp;   ;  ****
&nbsp; &nbsp; &nbsp;   LDAPBaseDN  ; &nbsp;  cn=authenticated users,cn=abc,o=a1.com
  ; &nbsp; &nbsp; LDAPFilter &nbsp;   ; &nbsp; &nbsp; &nbsp; (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&#39; 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 &quot;account a not found";..

Can you provide some input?

Regards,
-Rajesh




--
Regards,
-Rajesh

&quot;Stick to our roots and not to forget where we come from"
Re: LDAP authentication for a user
user name
2007-12-31 01:28:38
Hi guys,

Solved the problem.

Thanks,
-Rajesh

On Dec 31, 2007 11:48 AM, Rajesh Dharmalingam < rajesh.dharmalingamgmail.com">rajesh.dharmalingamgmail.com > wrote:
Hi,

I made the authentication work for the previous post. Now, i am facing with one more problem with the following schema:

dn: cn=rajeshtest, cn=authenticated users, cn=abc, o=rajesh.com
authenticationuserpassword: rajeshtest
defaultcontext: o=test,cn=abc,o=rajesh.com
userPassword:: rajeshtest
description: rajeshtest
objectClass: top
objectClass: authenticationuser
cn: rajeshtest

configuration file:
&nbsp; <Plugin DJabberd::Authen::LDAP>
&nbsp; &nbsp; &nbsp;   LDAPURI &nbsp;   ; &nbsp; &nbsp; &nbsp;  ldaps://ip:port/
&nbsp; &nbsp;   ;  LDAPBindDN&nbsp; &nbsp; &nbsp;  o=rajesh.com
 &nbsp;   ; &nbsp; LDAPBindPW &nbsp; &nbsp;  ****
&nbsp; &nbsp; &nbsp;   LDAPBaseDN  ; &nbsp;  cn=authenticated users,cn=abc,o=rajesh.com
 &nbsp;   ;  LDAPFilter&nbsp; &nbsp; &nbsp;   ; &nbsp;  (cn=%u)
&nbsp; </Plugin>

ldap change:
&nbsp; &nbsp;  In ldap search, included the scope as sub for searching.

When i try to authenticate this user with the above mentioned configuration/changes, I am not able to login? Is there anything i need to include in filter or in base dn. Basic difference between the previous schema and this schema is, i have a default context.

Thanks and Regards,
-Rajesh


On Dec 28, 2007 8:08 PM, Rajesh Dharmalingam < rajesh.dharmalingamgmail.com" target="_blank">rajesh.dharmalingamgmail.com > 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

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>
&nbsp; &nbsp; &nbsp;   LDAPURI &nbsp;   ; &nbsp; &nbsp; &nbsp;  ldap://ip:port/
&nbsp; &nbsp; &nbsp;   LDAPBindDN&nbsp; &nbsp; &nbsp;  o=a1.com
  ; &nbsp; &nbsp;  LDAPBindPW&nbsp;   ;  ****
&nbsp; &nbsp; &nbsp;   LDAPBaseDN  ; &nbsp;  cn=authenticated users,cn=abc,o=a1.com
  ; &nbsp; &nbsp; LDAPFilter &nbsp;   ; &nbsp; &nbsp; &nbsp; (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&#39; 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 &quot;account a not found";..

Can you provide some input?

Regards,
-Rajesh




--
Regards,
-Rajesh

&quot;Stick to our roots and not to forget where we come from"



--
Regards,
-Rajesh

&quot;Stick to our roots and not to forget where we come from"
Re: LDAP authentication for a user
user name
2007-12-31 01:57:22
  <Plugin DJabberd::Authen::LDAP>
 ; &nbsp; &nbsp; &nbsp; LDAPURI&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; ldaps://ip:port/
&nbsp; &nbsp; &nbsp; &nbsp; LDAPBindDN  ; &nbsp; &nbsp; &nbsp;  cn=rootacces,o=rajesh.com
 &nbsp; &nbsp; &nbsp;  LDAPBindPW  ; &nbsp; &nbsp; &nbsp;  *****
&nbsp; &nbsp; &nbsp; &nbsp; LDAPBaseDN  ; &nbsp; &nbsp; &nbsp;  o= rajesh.com
 &nbsp; &nbsp; &nbsp;  LDAPFilter  ; &nbsp; &nbsp; &nbsp;  (&(objectclass=authenticationuser)(cn=%u))
  </Plugin>

With this configuration, we can search for a particular user of the below mentioned schema...

Regards,
-Rajesh

On Dec 31, 2007 12:58 PM, Rajesh Dharmalingam < rajesh.dharmalingamgmail.com">rajesh.dharmalingamgmail.com> wrote:
Hi guys,

Solved the problem.

Thanks,
-Rajesh


On Dec 31, 2007 11:48 AM, Rajesh Dharmalingam < rajesh.dharmalingamgmail.com" target="_blank"> rajesh.dharmalingamgmail.com > wrote:
Hi,

I made the authentication work for the previous post. Now, i am facing with one more problem with the following schema:

dn: cn=rajeshtest, cn=authenticated users, cn=abc, o=rajesh.com
authenticationuserpassword: rajeshtest
defaultcontext: o=test,cn=abc,o=rajesh.com
userPassword:: rajeshtest
description: rajeshtest
objectClass: top
objectClass: authenticationuser
cn: rajeshtest

configuration file:
&nbsp; <Plugin DJabberd::Authen::LDAP>
&nbsp; &nbsp; &nbsp;   LDAPURI &nbsp;   ; &nbsp; &nbsp; &nbsp;  ldaps://ip:port/
&nbsp; &nbsp;   ;  LDAPBindDN&nbsp; &nbsp; &nbsp;  o=rajesh.com
 &nbsp;   ; &nbsp; LDAPBindPW &nbsp; &nbsp;  ****
&nbsp; &nbsp; &nbsp;   LDAPBaseDN  ; &nbsp;  cn=authenticated users,cn=abc,o=rajesh.com
 &nbsp;   ;  LDAPFilter&nbsp; &nbsp; &nbsp;   ; &nbsp;  (cn=%u)
&nbsp; </Plugin>

ldap change:
&nbsp; &nbsp;  In ldap search, included the scope as sub for searching.

When i try to authenticate this user with the above mentioned configuration/changes, I am not able to login? Is there anything i need to include in filter or in base dn. Basic difference between the previous schema and this schema is, i have a default context.

Thanks and Regards,
-Rajesh


On Dec 28, 2007 8:08 PM, Rajesh Dharmalingam < rajesh.dharmalingamgmail.com" target="_blank">rajesh.dharmalingamgmail.com > 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

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>
&nbsp; &nbsp; &nbsp;   LDAPURI &nbsp;   ; &nbsp; &nbsp; &nbsp;  ldap://ip:port/
&nbsp; &nbsp; &nbsp;   LDAPBindDN&nbsp; &nbsp; &nbsp;  o=a1.com
  ; &nbsp; &nbsp;  LDAPBindPW&nbsp;   ;  ****
&nbsp; &nbsp; &nbsp;   LDAPBaseDN  ; &nbsp;  cn=authenticated users,cn=abc,o=a1.com
  ; &nbsp; &nbsp; LDAPFilter &nbsp;   ; &nbsp; &nbsp; &nbsp; (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&#39; 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 &quot;account a not found";..

Can you provide some input?

Regards,
-Rajesh




--
Regards,
-Rajesh

&quot;Stick to our roots and not to forget where we come from"



--
Regards,
-Rajesh

&quot;Stick to our roots and not to forget where we come from"



--
Regards,
-Rajesh

&quot;Stick to our roots and not to forget where we come from"
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )