RE: [PHP] Domain Controller Discovery in PHP
| From: | Jason | Date: | Mon, 27 Sep 2010 15:26:26 +0000 |
| Subject: | RE: [PHP] Domain Controller Discovery in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-308330@lists.php.net to get a copy of this message | ||
Hi Rob,
I believe you should be able to do this with nothing more than DNS (this is how Windows clients do
it).
Once you have the DNS domain of the machine you're on (_SERVER["USERDNSDOMAIN"]),
query for SRV records called the following:
Name: _ldap._tcp.dc._msdcs.<machine domain name>
That should return one or more records in the answer, each one will be the FQDN of a domain
controller.
Additional info from the horses mouth: http://support.microsoft.com/kb/247811
HTH
Jason
-----Original Message-----
From: Robert Cummings [mailto:robert@interjinn.com]
Sent: 27 September 2010 16:05
To: PHP General
Subject: [PHP] Domain Controller Discovery in PHP
Hello list,
Does anyone know a method in Windows Server 2003 to discover one or more
domain controllers to which the machine is connected. I know as an
administrator I can use dsquery and various other administrator
commands, but I'm unsure how to do so within PHP from an unprivileged
vantage point.
Thanks,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php