I have a question in regards to LDAP, or specifically LDAP.Client package. I’d like to list all the members of specific LDAP group but I cannot make it working with the package. If I enter into bash below code I’m getting a list of members attached to the group
Your ldapsearch command uses anonymous mode. This was recently implemented in LDAPClient.jl, so something like the following should work:
using LDAPClient
server = "ldap://ldap.mycompany.com"
base = "ou=Groups,o=mycompany.com"
filter = "(cn=my_ldap_group_to_list_members)"
conn = LDAPClient.LDAPConnection(server)
LDAPClient.simple_bind(conn)
res = LDAPClient.search(conn, base, LDAPClient.LDAP_SCOPE_SUBTREE; filter)
for entry in LDAPClient.each_entry(res)
println(entry["memberuid"])
end
LDAPClient.unbind(conn)