Modify smb.conf to use WINS settings from DHCP?

Hello all :slight_smile:
Background: I installed PureOS on my laptop after replacing the hard drive back in Feb 2018 and was super happy with it until it errored on an update at some point, maybe a year ago? I didn’t have time to look into it as I’ve been away from home until now.
Booting stalled after a couple of “…recovering journal…clean…” lines. I got to a prompt with Ctrl-Alt-f2, logged in and ran “sudo dpkg --configure -a”. Got a ton of “Setting up …”, and a few “/run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.” Then…

Here’s the thing… :
“If your computer gets IP address information from a DHCP server on the network, the DHCP server may also provide information about WINS servers (“NETBIOS name servers”) present on the network. This requires a change to your smb.conf file so that DHCP-provided WINS settings will automatically be read from /var/lib/samba/dhcp.conf.
The DHCP-client package must be installed to take advantage of this feature.
Modify smb.conf to use WINS settings from DHCP?”

Now I know I should know this (and maybe I do) but frankly networking is mostly a mystery to me. I’m happily and easily connected via other Android and Windows devices to a normal home router, and I believe I have a dynamic IP. Do I choose Yes or No ?! :slight_smile:

TIA!:smile:

DHCP client can execute script as part of network stack initialisation.
The script may (re)generate smb config snippet
Eg. to have smb.conf.in with placeholders in wins server option and then expand them with simple sed to smb.conf and re-load samba.

@ruff thanks for the reply! but you’ve gone over my head… I literally just have to choose a yes or no to the question "Modify smb.conf to use WINS settings from DHCP?”. Embarassed to be asking something so simple…

(fwiw I think the answer is Yes because I have dynamic IP but I reckon you folk will know for sure and the consequences of getting things wrong is worth the embarassment haha)

Oh, I misread the question (actually didn’t read it to the end it seems) so in most of the case the answer should be No. WINS is only required on multihomed smb network. If you use plain home network you don’t need that even if you use windows file share.

2 Likes

@ruff awesome thank you!!