[Samba] wbinfo; --getdcname vs --DSgetdcname

Andrew Bartlett abartlet at samba.org
Tue Jan 6 19:17:43 MST 2015

On Tue, 2014-12-30 at 14:45 -0800, Mike Morris wrote:
> I'm wondering what the difference is between the two wbinfo functions, 
> "getdcname" and "DSgetdcname". The help is not very helpful here:
> --dsgetdcname /|domain|/
>     Find a DC for a domain.
> --getdcname /|domain|/
>     Get the DC name for the specified domain.
> I have a Samba4 PDC that is returning different results for these 
> depending upon whether it's run on the PDC itself, or on a member 
> workstation; I'm trying to determine if this is related to group id 
> mapping issues.
> On the PDC itself, "getdcname" just plain fails, with "Could not get dc 
> name".
> But "dsgetdcname" returns what seem like valid results in both cases, 
> but with subtle differences, such as with or without leading "\\" in 
> names, and with netbios names in one case and an IP address in the 
> other. Lastly, the 3rd line of output is either a "1" or a "2", but I 
> have no idea what that signifies.
> Can anyone clarify the output of dsgetdcname, and if this is normal?

I wouldn't trust the output of this on the DC, if the DC is an AD DC, as
in our currently released versions, this is using the internal winbind,
which wasn't completed.  

The results on the member server should be more reasonable.  We will use
just one winbindd codebase from Samba 4.2 on, so that should be better
in the future. 

Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba mailing list