LDAP bind error

i am new to ruby …
in java my ldap server is connecting like

username=“myname”
password="*********"
LDAPConnection ld = new LDAPConnection();
ld.connect( “192.168.1.1”, 389);
con=ld.authenticate
(“uid=”+username+",ou=People,dc=mydomain,dc=com",password);
/// con—>true

but in ruby

ldap_con = Net::LDAP.new({:host => ‘192.168.1.1’, :port => 389,
:auth=>{ :method=>:simple,:username =>
username,
:password => password
}
})
@con=ldap_con.bind

#@con —>false (always )

what is wrong here
any help please…

On 10/8/07, Pokkai D. [email protected] wrote:

/// con—>true
@con=ldap_con.bind

#@con —>false (always )

what is wrong here
any help please…

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

Try giving the whole DN as the user name.

Francis C. wrote:

Try giving the whole DN as the user name.

sorry i did’t get you…
can you show a sample (how to give the whole DN as the user name )

thank you

On 10/8/07, Pokkai D. [email protected] wrote:

Francis C. wrote:

Try giving the whole DN as the user name.

sorry i did’t get you…
can you show a sample (how to give the whole DN as the user name )

It’s in your own example:

uid=username,ou=People,dc=mydomain,dc=com

Francis C. wrote:

uid=username,ou=People,dc=mydomain,dc=com

not fine
same error…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs