Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #2827

problems using ruby-ldap to connect with windows AD

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!feeds.phibee-telecom.net!talisker.lacave.net!lacave.net!not-for-mail
From kang cao <cooker_bj@hotmail.com>
Newsgroups comp.lang.ruby
Subject problems using ruby-ldap to connect with windows AD
Date Thu, 14 Apr 2011 00:57:01 -0500
Organization Service de news de lacave.net
Lines 30
Message-ID <06c30e3c211faaf23530b00c52e1892a@ruby-forum.com> (permalink)
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1302760678 86877 65.111.164.187 (14 Apr 2011 05:57:58 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Thu, 14 Apr 2011 05:57:58 +0000 (UTC)
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 381511
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <06c30e3c211faaf23530b00c52e1892a@ruby-forum.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:2827

Show key headers only | View raw


hi:
  I am using ruby-ldap to connect with windows AD. but when I bind,it
alway gives me "Cann't contact LDAP Server". my code is:
require 'rubygems'
require 'ldap'
 begin
 ldap_host = '172.17.20.191'
 ldap_port = 636
 ldap_conn = LDAP::SSLConn.new(ldap_host,ldap_port)
 puts "trace 2 ldap_conn: #{ldap_conn.class}"
 ldap_conn.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
 puts "trace 3 ldap_conn: #{ldap_conn.class}"
 bind_dn = "cn=altirisadmin,ou=Golden-Altiris,dc=autonavi,dc=com"
 password_dn = "Altirisadmin"
 ldap_conn.bind(bind_dn,password_dn){ ldap_conn.perror("bind")}
 puts "trace 4 ldap_conn: #{ldap_conn.class}"
 rescue
 puts "trace 5 oops, #{$!}"
 end

  I have alreay tried ldapsearch. it does work but ruby-ldap doesn't.
 my system is centos 5.4 x64. ruby is "ruby 1.8.7 (2011-02-18 patchlevel
334) [x86_64-linux]". openldap was installed by yum and the version is
0.9.11.
I also tried to install openldap by downloadng source code and
compilering them. but it still gives me same answer.

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar | Unroll thread


Thread

problems using ruby-ldap to connect with windows AD kang cao <cooker_bj@hotmail.com> - 2011-04-14 00:57 -0500
  Re: problems using ruby-ldap to connect with windows AD kang cao <cooker_bj@hotmail.com> - 2011-04-14 09:53 -0500
    Re: problems using ruby-ldap to connect with windows AD Nick Klauer <klauer@gmail.com> - 2011-04-14 13:20 -0500
      Re: problems using ruby-ldap to connect with windows AD Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-14 13:33 -0500

csiph-web