[Samba] Right-way to use " bind interfaces only = Yes"?
Gilles
codecomplete at free.fr
Sun Jun 22 13:52:27 UTC 2025
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?
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
root at debian-dell:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
state UP group default qlen 1000
link/ether 00:80:64:fd:7a:c6 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.19/24 brd 192.168.0.255 scope global dynamic enp4s0
valid_lft 852956sec preferred_lft 852956sec
inet6 2a01:e0a:590:fd80:280:64ff:fefd:7ac6/64 scope global dynamic
mngtmpaddr
valid_lft 86345sec preferred_lft 86345sec
inet6 fe80::280:64ff:fefd:7ac6/64 scope link
valid_lft forever preferred_lft forever
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.
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
More information about the samba
mailing list