[Samba] Right-way to use " bind interfaces only = Yes"?

Rowland Penny rpenny at samba.org
Sun Jun 22 14:11:37 UTC 2025


On Sun, 22 Jun 2025 15:52:27 +0200
Gilles via samba <samba at lists.samba.org> wrote:

> On 22/06/2025 13:57, Rowland Penny via samba wrote:
>  > From what you posted in your earlier post, this appears to be Samba
>  > 4.17.12, so probably Debian 12.
>  >
>  > In which case, there is no /etc/init directory and there isn't a
>  > smbd.conf file, it will be /etc/samba/smb.conf.
>  >
>  > I do not think that reloading the Samba config will change the
>  > interfaces for a running smbd, it binds to the interfaces at
>  > startup.
>  >
>  > Can I suggest you stop using the default Debian Samba and use the
>  > version from bookworm-backports, this will get you 4.22.2 at the
>  > moment and that is supported by Samba, 4.17.12 is only supported
>  > by Debian and as such isn't likely to get fixed if you have hit a
>  > bug, which is unlikely.
>  >
>  > '0.0.0.0' is not the loopback device.
>  >
>  > 'ifconfig' is deprecated, it has been replaced with 'ip a', what
>  > does that show ?
> 
> Yes, it's Debian 12 and Samba 4.17.12.
> 
> I prefer installing packages through apt. Is 4.22.2 available as a
> package?

Yes, from bookworm-backports

Add this line to /etc/apt/sources.list:

deb http://deb.debian.org/debian bookworm-backports main

Run 'apt update'

Then:

apt install -t bookworm-backports attr samba smbclient winbind
libnss-winbind libpam-winbind ldb-tools krb5-user python3-setproctitle

> 
> I know 0.0.0.0 isn't the loopback device. Here's what I wrote:
>  > If I use it, Samba only listens to the loopback interface.
> =============
> root at debian-dell:~# netstat -tunlp
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address  State
> PID/Program name
> tcp        0      0 127.0.0.1:445           0.0.0.0:*  LISTEN
> 396/smbd

Mine listens on IP as well.

> 

> On 22/06/2025 14:12, Θεόφιλος Ιντζόγλου wrote:
>  > If you are using NetworkManager and systemd you are probably
>  > getting 
> samba
>  > service to start before it actually configures your network card
>  > so 
> it only
>  > finds the loopback. Try to configure systemd to start smb services
>  > after NetworkManager-wait-online.service
> 
> It's a thin client, doesn't have much RAM, so I installed Debian
> without X.

Then you probably are not using NM.

> 
> Should I edit /usr/lib/systemd/system/smb.service so it loads after 
> Ethernet is up and running (IP assigned by DHCP)?
> https://serverfault.com/questions/482730/systemd-dependencies-and-boot-order 
> 
> 

Definitely worth trying.

Rowland
 



More information about the samba mailing list