On Thu, Oct 20, 2011 at 1:32 PM, Wari Wahab <wari.wa...@gmail.com> wrote:

> **
> Hi Martin, thanks a lot. I've tested the changes you made. On my gitorious
> install, I got a good login authentication results from a few accounts that
> I've tested. The test_ldap_connection script still fails on me though. I'm
> not sure why myself.
>
> I believe the dump is from the second bit (get_dn_user)
>
> root@repos:/var/www/gitorious# RAILS_ENV=production bundle exec
> script/test_ldap_connection wari password
> Not there yet.
> For debugging purposes, this is the username we tried: FOOBAR\wari
> /var/www/gitorious/rots/ruby/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:1097:in
> `bind': invalid binding information (Net::LDAP::LdapError)
>     from
> /var/www/gitorious/rots/ruby/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:701:in
> `bind'
>     from
> /var/www/gitorious/lib/gitorious/authentication/ldap_authentication.rb:120:in
> `get_dn_of_user'
>     from script/test_ldap_connection:23
>

>From looking around in the net-ldap code, it looks like one or both of
bind_username and/or bind_password need to be nil for this to happen.

Do you have bind_username and bind_password set up in your production
section of your authentication.yml?  Is your server running with the
production environment?

I can reproduce this problem if one or both of these config items are not
set --- will improve the behaviour of get_dn_of_user so that it doesn't fail
so catastrophically in this case.

Martin


> On 20/10/2011 10:27, Martin Sandiford wrote:
>
> Hi folks,
>
> I've adapted the patch to incorporate the feedback.  Changes are to allow
> unencrypted connections via configuration, and some debug additions to the
> test script.  I've also cloned the mainline repo on gitorious and pushed the
> update there.
>
> You can find it at
> https://gitorious.org/~msandiford/gitorious/gitorious-ldap-auth-search
>
> Cheers,
> Martin
>
>  On Thu, Oct 20, 2011 at 1:06 AM, IronMania <ironmani...@googlemail.com>wrote:
>
>> Hi,
>>
>> my test runs. If you replace the @connection and auth with the
>> fallowing
>>
>> @connection = @connection_type.new :host => SERVER,
>> :port => port,
>> :base => base_dn,
>> :auth => {
>> :username => user,
>> :password => pass,
>> :method => :simple}
>>
>> I just don't know with the user & pass. I used the script from Martin
>> but I have problems with my authentications.yml
>> If I write everything in there, it is still nil.
>>
>> Joerg
>>
>> On 19 Okt., 10:36, Wari <wari.wa...@gmail.com> wrote:
>> > BTW, the authentication test will still fail though:
>> >
>> > root@repos:/var/www/gitorious# RAILS_ENV=production bundle exec script/
>> > test_ldap_connection wari password
>> > Not there yet.
>> > For debugging purposes, this is the DN we tried: FOOBAR\wari
>>
>> --
>> To post to this group, send email to gitorious@googlegroups.com
>> To unsubscribe from this group, send email to
>> gitorious+unsubscr...@googlegroups.com
>>
>
> --
> To post to this group, send email to gitorious@googlegroups.com
> To unsubscribe from this group, send email to
> gitorious+unsubscr...@googlegroups.com
>
>
>  --
> To post to this group, send email to gitorious@googlegroups.com
> To unsubscribe from this group, send email to
> gitorious+unsubscr...@googlegroups.com
>

-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

Reply via email to