Created
June 20, 2011 16:59
-
-
Save vpereira/1035997 to your computer and use it in GitHub Desktop.
simpleBind with ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'ldap' #gem ruby-ldap | |
conn = LDAP::Conn.new('localhost', 389) | |
conn.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION,3) | |
r = conn.bind "cn=bigshot,dc=test,dc=com","opensesame" | |
puts r.inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment