[Samba] which NIC is samba4 AD using ?

Marc Muehlfeld mmuehlfeld at samba.org
Mon Nov 14 17:01:52 UTC 2016


Hello Felipe,

Am 14.11.2016 um 14:47 schrieb Felipe_G0NZÁLEZ_SANTIAG0 via samba:
> 1. I need to know by using a command -if possible- or antoher
> way, which NIC is samba AD using? Apart of looking for the
> 'interfaces' option in the smb.conf. So, Exists other way
> to know that? Because if I coding this method expecting
> for the smb.conf, I could have problems if smb.conf has
> been deleted.

If your smb.conf has been deleted, your DC is in trouble. At least when
you (re-)start the service the next time. :-)

Since "testparm --parameter-name" won't show you the options for the
interface parameter on a DC, if not set, you can use the output of
# netstat -tlpn | grep "samba"
and pipe it through sort/uniq/awk to get the IP addresses, Samba is
listening on.




> 2. If during provisioning a DC I don't specify the network
> interface Samba select one randomly. In case of my server
> have just one NIC: is there any difference between
> specifing the NIC or not?

This depents. If Samba auto-selected the network where your clients are,
then you have luck. If it selects the other, or you have AD clients in
both networks, they are not able to connect to the AD.

If you server is having multiple interfaces, pass the
--option="interfaces=lo eth0" --option="bind interfaces only=yes"
parameters to the "samba-tool" command during provisioning/joining. This
enables you to select the correct interface(s).


Regards,
Marc




More information about the samba mailing list