Refurbished Macbook pro's localhostname set to "Toms-AppleWatch" on fresh OS reinstall / Harddrive wipe
I've seen this sort of thing before, particularly when I was in a hotel. I noticed my Macbook was showing up with the name of someone else's iOS device. I'm assuming the DHCP server was re-using an IP that was previously leased to the other device.

You mentioned that scutil --get HostName did not show the offending hostname, but did it show any hostname set at all? If not, try setting one explicitly:

sudo scutil --set HostName Darren

That seemed to work for me. The HostName attribute shouldn't be overridden by DHCP, if it is set. But, in practice, this changes all the time as the host name gets set at boot and bash honors whatever old name DNS/DHCP has for the last device to use the IP address issued. This is a problem with your network issuing a new name. You could try to force bash to keep re-evaluating the correct name, but this has been so for years. It has nothing to do with your Mac being refurbished or cleanly installed (but good troubleshooting to provide those details):


Strange domain name appears in Sharing Preferences, source unknown
Mac OS X Mountain Lion - DNS resolving uses wrong order on VPN via dial-up connection (a.k.a. DNS is hard, always)
My Mac mini&#39;s computer name keeps changing when it resumes from sleep (Just wait till you get Toms-AppleWatch (2) and (3) going if you don't tune your DNS setup)