I have this working ldapsearch
command for connecting anonymously to an internal ldap server:
$ ldapsearch -h my.host -p 389 -x -LLL -s base -b "" namingContexts
dn:
namingContexts: DC=org,DC=sample
Now I would like to list the same using curl:
$ curl -v "ldap://my.host:389/dc=org,dc=sample namingContexts"
* Trying ...
* Connected to my.host (....) port 389 (#0)
* LDAP remote: search failed Success 000004DC: LdapErr: DSID-0C090A5C, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v4563
* Closing connection 0
curl: (39) LDAP remote: search failed Success 000004DC: LdapErr: DSID-0C090A5C, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v4563
So I get a connection to the server but how do I list the namingContext without providing credentials/anonymously with curl.
0 Answers