Adding WINS to All Network Connections

jwm3wn
New Contributor III

Does anyone have a good method of adding WINS servers to Ethernet, Wi-Fi, and Ethernet Adapters?

Like in the picture below?8160dbb832a040bc81d9c7fd6eb93fa8

I need to add two WINS Servers to our Macs via bash script if possible.

I think I've identified the .plist that this is stored at (/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist), but I'm not having any lucky modifying it.

If the best way to do it is the add it to this plist, I guess I need to insert two values in the WINSServerAddressList key/array: 869c6b7761be49ccbae6bd96e7c2e168

8 REPLIES 8

Snickasaurus
Contributor

If you just need to modify that value then a simple:

defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server WINSServerAddressList "192.168.229.2"

Untested as I don't use WINS but that is the command. Might try without the quotes. Good luck.

jwm3wn
New Contributor III

Hello @Snickasaurus .

I need to add two WINS servers to that array.

Do you know the command for that?

Thanks!

Snickasaurus
Contributor

@jwm3wn Looking at it and I can't seem to find a way to add two addresses. Give me a little more time and I'll see what I can find.

Snickasaurus
Contributor

I was thinking one would have to use PlistBuddy but I believe it can be done with just the defaults command. This is a snippet from a script I used in the past.

defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist WINSServerAddressList -array-add '
<string>192.168.1.11</string>
<string>192.168.1.12</string>'

I'm not at my Mac to test it but I did find this page with some searching. Perhaps it can get you headed in the correct direction. I'll be home a little later today and can test a few things out.

jwm3wn
New Contributor III

@Snickasaurus , it doesn't look like that command works. I can add one WINS server at a time, so that works. The problem is that it does not update the WINS server in the GUI.

Is there not an scutil command or something else that uses a unix executable that does it?

Snickasaurus
Contributor

I haven't been able to get this to work with more than one address. I'll keep trying. Meanwhile, I hope to give this a bump so someone else might give their take on it.

Snickasaurus
Contributor

@jwm3wn Check out the script at the top of this post. Format your 'defaults write' command like he did with the '--add-array -string' portion and see if that adds both WINS IP Addy's.

mattmcchesney
New Contributor III

I was trying to do this exact thing and finally got it to work adding two with the following syntax

defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server WINSServerAddressList -array "XXX.XXX.XXX.XXX" "XXX.XXX.XXX.XXX"