NetServerEnum2 and looking for dc
mimir at diament.ists.pwr.wroc.pl
Mon Feb 11 12:52:01 GMT 2002
On Mon, 11 Feb 2002, Steven French wrote:
> Make sure that you look at the function get_dc_list (see namequery.c - at
> least in the head branch) which does something similar to what you want but
> using the Netbios name lookup (which is less reliable in some cases - since
> not all servers register 0x1C and WINS with multiple subnets is a mess).
Exactly. That's probably why WinNT Server uses NetServerEnum2.
> Probably best would be to modify the get_pdc_name function to make it
> "get_dc_name" and adding a parm ala get_dc_list to make the new function
> find either the PDC or all logon servers for the domain (via NetServerEnum
> rather than WINS).
Yes. I'm thinking about this. To make the current function a 'lower level'
and call it from inside functions like get_dc_name, get_pdc_name...
Actually, even from my stuff's point of view it's dangerous to relay on
response from Backup Domain Controller. I think I better leave it as it is
now and just fail if there's no response from PDC, while establishing
> The new function would be useful in the many cases when
> Netbios-over-TCPIP is disabled or the netbios names are unreachable. Come
> to think of it - we should not forget the "best" way - checking for the dns
> server resource records that the domain controllers register - the third
> and final. The functions in
Thus, I can construct more reliable method for establishing trust
relationship than NT Serv uses :)
> There may be cases where a combination of calls to get_dc_list and
> get_dc_name and even a dns RR lookup is required in order to successfully
> get the (complete) list of domain controllers in a domain.
|Rafal 'Mimir' Szczesniak <mimir at diament.ists.pwr.wroc.pl> |
|*BSD, GNU/Linux and Samba /
More information about the samba-technical