Prev: Heredocs, print_r() and newline "\n" and fnmatch() -curiousfailures ...
Next: Php Newsletter script
From: Robert Cummings on 27 Sep 2010 11:04 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.
From: "Jason" on 27 Sep 2010 11:26 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(a)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
From: Robert Cummings on 27 Sep 2010 14:38 On 10-09-27 11:26 AM, Jason wrote: > 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 Hi Jason, Thanks for the info. I don't actually have that server field (maybe because the article is for windows 2000), but maybe I can use your info to get to the next step anyways. Cheers, 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.
|
Pages: 1 Prev: Heredocs, print_r() and newline "\n" and fnmatch() -curiousfailures ... Next: Php Newsletter script |