DNS Hostname issues

SFRANCIS004
New Contributor III

We are having an issue with DNS in our environment.  Here's what happens:
-We take the iMac out of the box

-Run through set up wizard and set ladmin as administrator. When we launch terminal it already has a hostname called from another PC or Mac. This is before we name the computer L-###-M##, E-###-## or F-###-## or enroll it into JAMF Cloud.

It got so bad that we started having our network team delete the DNS and AD records when we erased and installed our iMacs; no dice.

We've been told they will look into it for years (since High Sierra).  I'm working with what little I know about networking so any suggestions are appreciated.




1 ACCEPTED SOLUTION

AJPinto
Honored Contributor III

MacOS by nature names the device MacBook Pro, or iMac when macOS is setup. This will create duplicate entries. You will need to set the hostname to something unique like the SN of the device with a script, which would happen after the DNS record is created. Join to the domain after the hostname has been updated (or even better, don't AD join). As far as DNS, that should sort itself out. There should be some automation to purge old DNS records.

View solution in original post

2 REPLIES 2

mschlosser
Contributor II

Given your description of things, the first place I would look to see if the Macs are receiving the host names via DHCP option 12; that sounds like what is going on to me. Sounds like the host name is assigned right when a network connection is up. Saw similar things at my workplace before we isolated parts of the campus via VLANs. 

AJPinto
Honored Contributor III

MacOS by nature names the device MacBook Pro, or iMac when macOS is setup. This will create duplicate entries. You will need to set the hostname to something unique like the SN of the device with a script, which would happen after the DNS record is created. Join to the domain after the hostname has been updated (or even better, don't AD join). As far as DNS, that should sort itself out. There should be some automation to purge old DNS records.