Solved

How to find the domain name for an MS Exchange server and for a LDAP server using C/C++?

Posted on 2008-06-18
2
3,616 Views
Last Modified: 2013-12-19
I'm new to Windows programming.  I'd like to use a C/C++ program to find the domain names of the local LDAP active directory server and the local MS Exchange server without knowing the addresses or names of the servers.  What are some ways to retrieve that information?  Thanks.
0
Comment
Question by:vsee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 71

Accepted Solution

by:
Chris Dent earned 125 total points
ID: 21824187

There are a couple of issues that need to be addressed.

You can't connect to something you know absolutely nothing about. So you would have to be able to determine what you were connecting to prior to into a database.

If you're running the program from a member of a domain it will happily let you get on with this because knowledge of the domain and it's services has been defined by that membership.

If you have nothing to do with the domain you would have to know or find a server with an LDAP service listening.

Once you've got that far you can query the RootDSE node for some basic information about the LDAP directory (LDAP://Server/RootDSE) then work down into the Configuration and dig out Exchange information.

That brings us onto the next issue. The information above isn't available to unauthenticated users, you must be able to log onto the domain. If you can do that you must know enough about the domain to skip the first stage anyway.

Chris
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question