Hello
I have the following code to test authentication using ldap (i use
ruby-net-ldap extension) :
require ''rubygems''
require ''net/ldap''
def test
user = ''bla''
pass = ''bla''
ldap = Net::LDAP.new :host => "10.20.0.128", :port => 389,
:auth =>
{:method => :simple, :username => user, :password => pass}
p (ldap.bind) ? "Authorization Succeeded!" : "Authorization
Failed:
#{ldap.get_operation_result.message}"
end
10.20.0.128 is my IP.
However I always get this error (which is originated by the ldap.bind
instruction) : "no connection to server"
Can anyone help me?
Thanks
regards
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---