Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. require 'net/ldap'
  2. ldap = Net::LDAP.new(:host => '10.0.0.32', :port => 389)
  3. if ldap.bind(:method => :simple, :username => "ttyler",
  4. :password => "********")
  5. # authentication succeeded
  6. else
  7. # authentication failed
  8. p ldap.get_operation_result
  9. end
  10.  
  11. #<OpenStruct extended_response=nil, code=49, error_message="80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1u0000", matched_dn="", message="Invalid Credentials">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement