Active Directory : How can we see a LDAP server?

Active Directory : How can we see a LDAP server?

Post by Claude Samuelso » Sun, 27 Apr 1997 04:00:00



There is no explanation in the Active Directory SDK on how to configure the
LDAP provider to make a LDAP server visible in the 'global directory tree'
 Do someone have an answer ?

 
 
 

Active Directory : How can we see a LDAP server?

Post by Nick Payn » Wed, 30 Apr 1997 04:00:00


You're more likely to get an answer in
microsoft.public.active.directory.interfaces. That is where ADS and LDAP
questions seem to be answered. And unfortunately no, I don't know the
answer to your question.

Nick Payne

http://www.pcug.org.au/~njpayne - home page of Cryptext



Quote:> There is no explanation in the Active Directory SDK on how to configure
the
> LDAP provider to make a LDAP server visible in the 'global directory
tree'
>  Do someone have an answer ?


 
 
 

1. Connecting Active Directory using LDAP api

Hi,

I am trying to perform a query on active directory with the following code -

#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <winldap.h>

#define BASEDN "DC=shalom,DC=com"
#define SCOPE LDAP_SCOPE_SUBTREE
#define FILTER "(sn=Eyal)"

int main(int argc, char** argv)
{
        LDAP*   ldap_con;
        char    *dn;
        int             rc, version;
        LDAPMessage     *result, *e;

        version = LDAP_VERSION3;

        ldap_con=ldap_init("shalom",389);
        if(ldap_con==NULL)
        {
                printf("ldap_init error - %u\n",LdapGetLastError());
        }
        else
        {
                printf("ldap_init succeded\n");
        }

        if(ldap_simple_bind_s(ldap_con,NULL,NULL)==-1)
        {
                printf("ldap_simple_bind error - %u\n",LdapGetLastError());
        }
        else
        {
                printf("ldap_simple_bind succeded\n");
        }

        rc = ldap_search_ext_s( ldap_con, BASEDN, SCOPE, FILTER, NULL, 0,
NULL, NULL, NULL, 0, &result );

        if ( rc != LDAP_SUCCESS )
        {
                printf("ldap_search_ext_s: %s\n", ldap_err2string(rc));
                return( 1 );
        }

        for ( e = ldap_first_entry( ldap_con, result ); e != NULL; e =
ldap_next_entry( ldap_con, e ) )
        {
                if ( (dn = ldap_get_dn( ldap_con, e )) != NULL )
                {
                        printf( "dn: %s\n", dn );
                        ldap_memfree( dn );
                }
        }

        ldap_msgfree( result );
        ldap_unbind( ldap_con );

        return (1);

I keep getting "ldap_search_ext_s: Unavailable"

What am i doing wrong ?

Any help/suggestion will be appreciated

Thanks,

2. I need to enlarge TeX

3. Active Directory link to SQL Server 2k

4. Motorola 56k archives ?

5. LSP sample and Active Directory Server

6. Need to capture "yes" "no" voice recordings---voulnteer

7. Extent Active Directory? While installing Mobil Info Server

8. Pac*Bell's Message Center?

9. LDAP SERVER

10. LDAP call from server side script using visual interdev

11. LDAP SERVER

12. Querying LDAP Servers

13. Registering Active Object in In-Process Server for Out of Process Server, HOW?