mokkai
1
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…
mokkai
2
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.
mokkai
3
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
mokkai
4
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