In macOS, change the computer names in the system settings, in the Share (Delning) dialog.
The university name standard begins with an identifier for each department and then a dash and a unique identifier. At BMC-IT and the departments we support we continue with the computer serial number like this:
- Begin with a TLA - the three letter acronym (Neuroscience - INV, Medical Biochemistry and Microbiology - IMB, Pharmaceutical biosciences - FBV, Medical Cell Biology - MCB, Uppsala Biomedical Centre - BMC, Public Health and Caring Sciences - IFV, etc)
- Then a dash -.
- Then the serial number max 11 characters (cut away the leading ones to keep the usually significant ones)
- The full computer name should be 15 characters or less (to not generate possible problems in old network sharing protocols like WINS... In a couple of years, when WINS is totally gone, then this rule most probably can be ignored)
The host name is however picked up from the DHCP-server. It is used as a prompt in the command line. With dynamic DHCP the IP and the host name may change from time to time. So to get a consistent hostname set it manually like this; in this example BMC-COVFEFE is used as hostname, but please use your own instead!
The terminal may look like this:
$ scutil --get HostName HostName: not set $ sudo scutil --set HostName BMC-COVFEFE Password: $ sudo scutil --set ComputerName BMC-COVFEFE $ sudo scutil --set LocalHostName BMC-COVFEFE $ scutil --get HostName BMC-COVFEFE $ scutil --get ComputerName BMC-COVFEFE $ scutil --get LocalHostName BMC-COVFEFE $
Also check and set the NetBIOS-name. It may or may not be the same as the computer name and host name. The default is the same as the hostname but if this has been changed before it may be something else. Change it like this:
The NetBIOS-name can be changed in the terminal as well like this:
$ sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName BMC-COVFEFE $ defaults read /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName BMC-COVFEFE $