Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Re: [MBS] using CURL to query Active Directory (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] CFBundleMBS.LocalizedString
Next thread: [MBS] MacUSBNotificationMBS --> MacUSBHIDMBS


[MBS] [ANN] 12.1pr5   -   Christian Schmitz
  Re: [MBS] using CURL to query Active Directory   -   Heinz
    Re: [MBS] using CURL to query Active Directory   -   Christian Schmitz
    [MBS] using CURL to query Active Directory   -   Giulio Mastrosanti

Re: [MBS] using CURL to query Active Directory
Date: 21.02.12 14:28 (Tue, 21 Feb 2012 14:28:14 +0100)
From: Heinz
>I need to query an Active Directory server,

Active Directory - so you're using windows ?
in that case you can maybe use a VBS script - there are many scrips
available that deal with LDAP / querying ADS
MBS has a function that allows you to run VBS-code from within your RB app
with using shell stuff : WindowsScriptMBS

(Powershell may also be an option....)

Heinz

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] using CURL to query Active Directory
Date: 21.02.12 12:03 (Tue, 21 Feb 2012 12:03:13 +0100)
From: Christian Schmitz

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

-

[MBS] using CURL to query Active Directory
Date: 21.02.12 09:56 (Tue, 21 Feb 2012 09:56:10 +0100)
From: 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?

thank you,

Giulio

- - - - - - - - - - - - - - - - - - - - - - -
BitBazar Srl
Via Andrea Doria, 57
00192 Roma
tel +39 0639737052
tel +39 0639725787
fax +39 0691659229
http://www.cantoberon.it
- - - - - - - - - - - - - - - - - - - - - - -

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info