From MR-Mencel at wiu.edu Tue Nov 10 16:48:04 2009 From: MR-Mencel at wiu.edu (MR-Mencel at wiu.edu) Date: Tue, 10 Nov 2009 15:48:04 -0600 (CST) Subject: [activeldap-discuss] Experiencing the "undefined method to_ber" when we try to update to 1.2.0 from 1.0.9 In-Reply-To: <1067704896.860461257889653753.JavaMail.root@zcs10> Message-ID: <1654961346.860561257889684097.JavaMail.root@zcs10> http://rubyforge.org/forum/forum.php?thread_id=46094&forum_id=1641 NoMethodError (undefined method `to_ber' for #): /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/site_ruby/1.8/net/ldap.rb:1295:in `bind_simple' /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/site_ruby/1.8/net/ldap.rb:1270:in `bind' activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:135:in `send' activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:135:in `execute' activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:654:in `log' activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:654:in `log' activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:135:in `execute' activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:269:in `simple_bind' activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:368:in `simple_bind' activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:263:in `simple_bind' activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:85:in `bind' activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:52:in `bind' activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:53:in `connect' activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:24:in `connect' activeldap (1.2.0) [v] lib/active_ldap/base.rb:1014:in `bind' From John.Sheahan at priceline.com Tue Nov 10 17:38:58 2009 From: John.Sheahan at priceline.com (Sheahan, John) Date: Tue, 10 Nov 2009 17:38:58 -0500 Subject: [activeldap-discuss] Newbie Question Message-ID: <09F205C089889344BDDB6FB253D4172159473EBE85@NW-E2K7-ECL1.corp.pcln.com> I'm trying to get a base connection to an Active Directory server. When I try the following, it appears to work since there are no error messages but when I change the password to something that I know is wrong, I get the same thing so I know I'm not really connecting. Is there a way to get more verbose error messages when trying to connect which might help me troubleshoot this problem? Thanks require 'rubygems' require 'active_ldap' ActiveLdap::Base.setup_connection( :host => "10.1.1.1", :user => "admin", :password => "password", :base => "dc=voice,dc=company,dc=com" ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From kou at cozmixng.org Wed Nov 11 06:52:06 2009 From: kou at cozmixng.org (Kouhei Sutou) Date: Wed, 11 Nov 2009 20:52:06 +0900 (JST) Subject: [activeldap-discuss] Experiencing the "undefined method to_ber" when we try to update to 1.2.0 from 1.0.9 In-Reply-To: <1654961346.860561257889684097.JavaMail.root@zcs10> References: <1067704896.860461257889653753.JavaMail.root@zcs10> <1654961346.860561257889684097.JavaMail.root@zcs10> Message-ID: <20091111.205206.29632864960018043.kou@cozmixng.org> Hi, In <1654961346.860561257889684097.JavaMail.root at zcs10> "[activeldap-discuss] Experiencing the "undefined method to_ber" when we try to update to 1.2.0 from 1.0.9" on Tue, 10 Nov 2009 15:48:04 -0600 (CST), MR-Mencel at wiu.edu wrote: > http://rubyforge.org/forum/forum.php?thread_id=46094&forum_id=1641 > > > NoMethodError (undefined method `to_ber' for #): > /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/site_ruby/1.8/net/ldap.rb:1295:in `bind_simple' > /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/site_ruby/1.8/net/ldap.rb:1270:in `bind' > activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:135:in `send' > activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:135:in `execute' > activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:654:in `log' > activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:654:in `log' > activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:135:in `execute' > activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:269:in `simple_bind' > activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:368:in `simple_bind' > activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:263:in `simple_bind' > activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:85:in `bind' > activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:52:in `bind' > activeldap (1.2.0) [v] lib/active_ldap/adapter/base.rb:53:in `connect' > activeldap (1.2.0) [v] lib/active_ldap/adapter/net_ldap.rb:24:in `connect' > activeldap (1.2.0) [v] lib/active_ldap/base.rb:1014:in `bind' This had been fixed in trunk. We will release 1.2.1 soon. Thanks, -- kou From kou at cozmixng.org Wed Nov 11 07:16:48 2009 From: kou at cozmixng.org (Kouhei Sutou) Date: Wed, 11 Nov 2009 21:16:48 +0900 (JST) Subject: [activeldap-discuss] ActiveLdap 1.2.1? Message-ID: <20091111.211648.1147241380209401431.kou@cozmixng.org> Hi Will, I've added 1.2.1 entry to CHANGES. Could you release 1.2.1? Thanks, -- kou From MR-Mencel at wiu.edu Thu Nov 12 14:06:36 2009 From: MR-Mencel at wiu.edu (Matt Mencel) Date: Thu, 12 Nov 2009 13:06:36 -0600 (CST) Subject: [activeldap-discuss] Newbie Question In-Reply-To: <09F205C089889344BDDB6FB253D4172159473EBE85@NW-E2K7-ECL1.corp.pcln.com> Message-ID: <1570056171.1283351258052796221.JavaMail.root@zcs10> I think maybe you need to "rescue" the failed bind and see what is being returned... I do something like this... #app/models/ldap_user.rb class LdapUser < ActiveLdap::Base ldap_mapping :dn_attribute => "uid", :prefix => "ou=people" def empty?() self.have_attribute?("dn") end def self.authenticate(username, password) return false if username.empty? or password.empty? find(username).authenticated?(password) end def authenticated?(password) bind(password) remove_connection true rescue ActiveLdap::AuthenticationError, ActiveLdap::LdapError::UnwillingToPerform false end end ----- Original Message ----- From: "John Sheahan" To: "ruby-activeldap-discuss at rubyforge.org" Sent: Tuesday, November 10, 2009 4:38:58 PM GMT -06:00 US/Canada Central Subject: [activeldap-discuss] Newbie Question I?m trying to get a base connection to an Active Directory server. When I try the following, it appears to work since there are no error messages but when I change the password to something that I know is wrong, I get the same thing so I know I?m not really connecting. Is there a way to get more verbose error messages when trying to connect which might help me troubleshoot this problem? Thanks require 'rubygems' require 'active_ldap' ActiveLdap::Base.setup_connection( :host => "10.1.1.1", :user => "admin", :password => "password", :base => "dc=voice,dc=company,dc=com" ) _______________________________________________ ruby-activeldap-discuss mailing list ruby-activeldap-discuss at rubyforge.org http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From enricob at gmail.com Tue Nov 24 13:22:28 2009 From: enricob at gmail.com (Enrico Bianco) Date: Tue, 24 Nov 2009 13:22:28 -0500 Subject: [activeldap-discuss] Intermittent ActiveLdap::EntryNotFound errors Message-ID: <7128D957-E9CF-48FB-A03D-018608EB1E52@gmail.com> Hi, I'm using ActiveLdap 1.0.9 in a Rails application to connect to an Active Directory and provide pass-through authentication. Sometimes, authentication randomly fails with an exception similar to the following: ActiveLdap::EntryNotFound (Couldn't find LDAPConnector::User: DN: : filter: ["sAMAccountName", ""]): activeldap (1.0.9) lib/active_ldap/operations.rb:321:in `find_one' activeldap (1.0.9) lib/active_ldap/operations.rb:296:in `find_from_dns' activeldap (1.0.9) lib/active_ldap/operations.rb:215:in `find' app/models/user.rb:12:in `ldap_entry' LDAPConnector::User is a subclass of ActiveLdap::Base that specifies the mapping to users in the LDAP. User is an ActiveRecord model that corresponds to the LDAP entries, storing application-specific information (such as columns for recording login times). User#ldap_entry looks up the LDAPConnector::User by searching on the User's 'login' attribute. The procedure for authenticating a user is to find the LDAP entry. Once found, a bind is attempted using the given password. Then, #remove_connection is called on the LDAP entry. (A sample of this method can be found on GitHub: http://github.com/enricob/authlogic_example/tree/with-activeldap) The odd part is that I can't reproduce this error on my own machine, in development or production environments. It only happens on our production machine. In case it is relevant, I've switched our deployment from a cluster of thins to an individual thin instance to an individual instance of Mongrel and the same error occurs. What could be causing this? Thanks, Enrico From wad at gmail.com Mon Nov 30 14:30:53 2009 From: wad at gmail.com (Will Drewry) Date: Mon, 30 Nov 2009 11:30:53 -0800 Subject: [activeldap-discuss] ActiveLdap 1.2.1? In-Reply-To: <20091111.211648.1147241380209401431.kou@cozmixng.org> References: <20091111.211648.1147241380209401431.kou@cozmixng.org> Message-ID: <2359eed20911301130g30f2728r363ff4a4d19266ce@mail.gmail.com> Hi kou, Sorry for the silence. I can get to it this week if that suits you? I'll tag and release as usual. (I know the gem repo has changed for rubyforge too so I'll figure out what needs to change for that.) Been a bit consumed by work-stuff for the past few weeks. cheers! will (always feel free to release whenever you're ready to since I'm usually a bottleneck!) On Wed, Nov 11, 2009 at 4:16 AM, Kouhei Sutou wrote: > Hi Will, > > I've added 1.2.1 entry to CHANGES. > Could you release 1.2.1? > > Thanks, > -- > kou >