[jcifs] How to get DomainController from Domain name
Christopher R. Hertel
crh at ubiqx.mn.org
Fri Jun 13 13:05:37 EST 2003
I *think* that what he's asking about is the "Primary Domain Controller
Location Protocol".
Mike (madlg3): When you say "Domain server" do you mean
- the Primary Domain Controller?
- any NT Domain Controller?
- the Domain Master Browser?
My guess is that you want the first... to find the Primary Domain
Controller.
The easy way to do this, as Eric suggests, is to send an NBT name query
for the <domain>1C name. On a broadcast LAN, you could get several
replies. Find the one that also has the <domain>1B name registered and
that'll be your PDC. If you query the WINS server, you will get back a
list of one or more IP addresses. The first entry in the list will be the
PDC.
The more difficult way to find the PDC is to use the "Primary Domain
Controller Location Protocol". This is documented in a very obscure
place. Search the web for "draft-leach-cifs-browser-spec-00.txt".
Yes, it's in the G*#)(@^ D&^@#&^ browser spec. draft.
Note that the browser spec draft was never anything more than a draft, and
that errors and omissions are likely.
Chris -)-----
On Thu, Jun 12, 2003 at 08:28:39AM +0000, eglass1 at attbi.com wrote:
>
>
> > does anybody know how could I get the Domain server for a given domain
> > name? I have seen that windows uses mailslots to do this. Can anyone
> > help me?
> >
>
> Try:
>
> UniAddress.getByName("DOMAIN", true);
>
> the boolean indicates that the name may represent a domain or workgroup
> rather than a host.
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs
mailing list