How do I run a ldap query using R?

后端 未结 4 1299
既然无缘
既然无缘 2021-02-06 12:30

I want to make a query against a LDAP directory of how employees are distributed in departments and groups...

Something like: \"Give me the department name of all th

4条回答
  •  旧时难觅i
    2021-02-06 12:39

    Found the answer myself:

    First run this commands to make sure RCurl is installed (as described in http://www.programmingr.com/content/webscraping-using-readlines-and-rcurl/ ):

    install.packages("RCurl", dependencies = TRUE)
    library("RCurl")
    

    And then user getURL with an ldap URL (as described in http://www.ietf.org/rfc/rfc2255.txt although I couldn't understand it until I read http://docs.oracle.com/cd/E19396-01/817-7616/ldurl.html and saw ldap[s]://hostname:port/base_dn?attributes?scope?filter):

    getURL("ldap://ldap.replaceme.com/o=replaceme.com?memberuid?sub?(cn=group-name)")
    

提交回复
热议问题