Skip to main content
Question

Adding WINS to All Network Connections


Forum|alt.badge.img+3
  • New Contributor
  • 7 replies

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

Like in the picture below?

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:

8 replies

Forum|alt.badge.img+8
  • Contributor
  • 131 replies
  • March 1, 2018

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.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 7 replies
  • March 1, 2018

Hello @Snickasaurus .

I need to add two WINS servers to that array.

Do you know the command for that?

Thanks!


Forum|alt.badge.img+8
  • Contributor
  • 131 replies
  • March 1, 2018

@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.


Forum|alt.badge.img+8
  • Contributor
  • 131 replies
  • March 1, 2018

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.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 7 replies
  • March 1, 2018

@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?


Forum|alt.badge.img+8
  • Contributor
  • 131 replies
  • March 4, 2018

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.


Forum|alt.badge.img+8
  • Contributor
  • 131 replies
  • March 14, 2018

@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.


Forum|alt.badge.img+11

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"

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings