Am 21.02.2012 um 09:56 schrieb Giulio Mastrosanti: > Hi all, > > I need to query an Active Directory server, > I need to check if a user exists and if the password is correct, and then > query the Active Directory to know if the user belongs to a given group. > > I think I could use curl, since it supports the ldap protocol, > but no Idea on how to accomplish this, O know verity little about ActibeƬve > Directory and ldap protocol. > > maybe could someone point me on some example code?
Well, the only LDAP thing I found is this from the curl documentation: > LDAP > > If you have installed the OpenLDAP library, curl can take advantage of it and > offer ldap:// support. > > LDAP is a complex thing and writing an LDAP query is not an easy task. I do > advice you to dig up the syntax description for that elsewhere. Two places > that might suit you are: > > Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10: > Working with LDAP URLs": > http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm > > RFC 2255, "The LDAP URL Format" http://www.rfc-editor.org/rfc/rfc2255.txt > > To show you an example, this is now I can get all people from my local LDAP > server that has a certain sub-domain in their email address: > > curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se/" > > If I want the same info in HTML format, I can get it by not using the -B > (enforce ASCII) flag. So you may be able to encode your request in the URL and have curl execute it. Greetings Christian -- Real Studio Conferences, Training and Meetings in Orlando, London, Pforzheim and Leipzig. More details and registration here: http://www.monkeybreadsoftware.de/realbasic/events/ _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
