High Sierra - Can't change NETBIOS name

Hi,


I have a problem in my LAN. My MacBookAir has these correct settings:


scutil --get ComputerName

MacBook Air di Fabio


scutil --get HostName

Air-di-Fabio


scutil --get LocalHostName

MacBook-Air-di-Fabio


But in the Advanced Network Preferences, I have a NetBios name of: Saltydog-A3 (which is the hostname of my smartphone on the LAN).

I can't change that NetBios Name as it appears stuck. Every time I try to change it, it reverts back to the smartphone name.


If I connect with ssh to my media center, I always get this message:


Last login: Sat Oct 21 11:18:49 2017 from saltydog-a3.station


My router, instead, lists the correct HostName of the LAN.


Any help?


Thanks

MacBook Air, macOS High Sierra (10.13)

Posted on Oct 21, 2017 2:58 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 24, 2017 6:39 AM

Even though it is possible to set computer name in Terminal it is not necessary. You can easily do it in System Preferences.


Yesterday I did some more tests. What I wrote about my nephew's Mac (High Sierra) is also valid for Sierra. So nothing has changed between 10.12 and 10.13.

And I'm gonna tell you why.

Naming convention for NetBIOS name is that the name can be at most 16 alphanumeric characters long. User can assign 15 characters. The 16th is reserved.


Read here for reference.


In macOS the computer name can be longer. What you choose there, is also assigned to NetBIOS name. You can assign a different name if you want, from within WINS, but you must follow NetBIOS naming convention. If computer name is less then 15 characters, NetBIOS name will be the same as computer name. Otherwise it'll take a "pseudo" random name. I quoted pseudo because it is not random at all. In my testing, for a very long computer name, the NetBIOS name was set to MACBOOAIR-1B52. The first ten characters are obvious, the 11th character is always a dash and the remaining 4 are the last 2 hexadecimal figures of the network adapter MAC address.


Now you have some oddities. That's why I told you a few messages earlier that Vodafone station is playing dirty.


Now to confirm that my theory about VF station is true, please turn it off until your computer name settings are in place.


Assign to computer name a 15 chars or less, name. I wouldn't use spaces. I'll stick to letters and numbers only. But it's up to you.

Check if NetBIOS name has changed accordingly. If not, choose another name of your choice but lesser than 15 chars. Press enter to confirm.

Click OK then Applica, then close System Preferences.

Open System Prefereces and check again that NetBIOS name hasn't changed.

If all is fine. Turn back on Vodafone station.


Let me know

28 replies

Oct 24, 2017 5:06 AM in response to Alberto Ravasio

What difference between isolating the Mac from the network or switching off the VSR? Maybe you meant to make a reboot to VSR to test it? I'll do later, as there are other users connected.


Meanwhile, just to add more weirdness: I have connected to a VPN (with Tunnelblick) to join a remote server. Once connected I had a look at the NetBios Name and.. voilà it was "MAC-DI-FABIO". Disconnecting from the VPN, the name was back to Saltydog-A3

Oct 22, 2017 1:59 AM in response to fabio56

fabio56 wrote:


If I connect with ssh to my media center, I always get this message:


Last login: Sat Oct 21 11:18:49 2017 from saltydog-a3.station


My router, instead, lists the correct HostName of the LAN.



ssh doesn't care about NetBIOS name. So the above line means that the host, named saltydog-a3.station, made the last connection on the date/time printed.


.station is the suffix, DNS server add to the host name. I guess is a Vodafone station of some sort.


What this command gives in return


host -a MacBookAirIP


change MacBookAirIP with the actual IP your computer has.

Oct 22, 2017 2:03 PM in response to fabio56

I'm not sure if this will work as I tried it on my Mac and it didn't.

Going back many OS versions, there was a bug that prevented the changes from sticking. I'm not sure if it was the NETBIOS name or WINS or Workgroup, but, if you make a copy of the network location and use that location, the changes made to it will stick.

In the Network system prefs, select Edit Locations from the Location popup menu. Use the Gear menu to Duplicate "Automatic" or whatever location you are currently using.

Switch to that network, then make the changes you need.


You may have to search very far back in these forums to find some tricks that may work.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

High Sierra - Can't change NETBIOS name

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.