Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
3,619 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
2 Comments
 
LVL 71

Accepted Solution

by:
Chris Dent earned 500 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

963 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