0

I have Samba installed on a Ubuntu 14.04 server, in my smb.conf I have

interfaces = lo em1
bind interfaces only = yes

This should make Samba bind to only the loopback and the first embedded network card, but it actually only binds to lo

root@server:~# lsof -ni:139
COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
smbd    830 root   29u  IPv4  11311      0t0  TCP 127.0.0.1:netbios-ssn (LISTEN)
smbd    830 root   31u  IPv6  11313      0t0  TCP [::1]:netbios-ssn (LISTEN)

If I comment these 2 lines in smb.conf it binds to em1 with no problems. What's happening there?

2

It's caused by em1 using DHCP. If the IP is static it works, and if using DHCP it works after I restart Samba.

Ubuntu is using upstart and samba is not set to be dependent on all network interfaces and will bind only to the available interfaces when it starts. See https://askubuntu.com/a/349142/332223

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.