#<OpenStruct code=32, error_message="0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best match of:\n\t'DC=enterprise,DC=my-company,DC=com'\n\u0000", matched_dn="DC=enterprise,DC=my-company,DC=com", message="No Such Object">
My IT admin set me a screenshot of what our AD attributes are. One of them, to no surprise, is 'sAMAAccountName', so I'm just trying to do a simple search on that.
require 'net/ldap'
ldap = Net::LDAP.new :host => "123.456.789.12",
:port => 389,
:auth => {
:method => :simple,
:username => "me...@my-company.com",
:password => "Password"
}
filter = Net::LDAP::Filter.eq("sAMAccountName", "*")
treebase = "dc=Users - Employees,dc=enterprise,dc=my-company,dc=com"
res=ldap.search(:base => treebase, :filter => filter)
p ldap.get_operation_result
puts "below"
What is the issue here? I am at a loss and would sincerely appreciate any feedback.
Thanks,
David
--
You received this message because you are subscribed to the Google Groups "Ruby LDAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-ldap+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.