# Net::ldap no bind result

**URL:** <https://www.ruby-forum.com/t/net-ldap-no-bind-result/122726>\
**Category:** Rails\
**Created:** [December 11, 2007, 10:42am UTC](https://www.ruby-forum.com/t/net-ldap-no-bind-result/122726 "2007-12-11T10:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/90ced4/32.png) [@davox](https://www.ruby-forum.com/u/davox)\
**Post date:** [December 11, 2007, 10:42am UTC](https://www.ruby-forum.com/t/net-ldap-no-bind-result/122726/1 "2007-12-11T10:42:10Z")

</div>

Hi,  
im having some trouble using net::ldap. bind doesnt return anything (not  
even false)

i basically use this code:

user,psw = ‘test’, ‘test’  
ldap = Net::LDAP.new(:host =\> ‘myldapserverip’, :port =\> 636, :base  
=\>‘dc=ehb,dc=be’, :auth =\> {:method =\> :simple, :username =\> user,  
:password =\> psw)  
if (ldap.bind) then  
“Authorization Succeeded! #{ldap.get\_operation\_result.message}”  
else  
“Authorization Failed: #{ldap.get\_operation\_result.message}”  
end

The connection to the server is alright (no ‘no connection to server’  
error)  
The ldap server is using ldaps, would that be the problem ?
