NET_GETDCNAME failed in samba-3.0.24 when 2003 is in some currently unknow state, but using other rpc methods, we can get dc name

boyang at
Sat Jul 14 02:22:40 GMT 2007

1. enviroment:
    domain controller: NTDOMAINPDC(,
    domain member: NTDOMAINSLES(, NTDOMAINXP(

2. When 2003(NTDOMAINPDC) in some currently unknown state,
NET_GETDCNAME(NetGetAnyDCName on windows) both failed.
    on windows, NetGetAnyDCName send rpc request with operation number
0x000d, which corresponds to
    NET_GETDCNAME operation number on samba.
    So, The macro definition is opposite to windows in samba.

3. But, NET_GETANYDCNAME(NetGetDCName on windows) both succeeded. It is
quite sure that 2003(NTDOMAINPDC) is in some state
    that causes NET_GETDCNAME to fail with error code
ERROR_NO_SUCH_DOMAIN. Because if rpc call is sent to NTDOMAINBDC,
    everything is fine. ie, both NET_GETDCNAME and NET_GETANYDCNAME
worked properly.

The problem is, should we enhance NET_GETDCNAME rpc call to tolerate
windows failure?  ie, using  as many methods as possible
to try to get dc name until success?

More information about the samba-technical mailing list