You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

My iMac's computer name keeps changing automatically after Yosemite upgrade

This started happening once I upgraded my iMac to Yosemite. It will add numbers to the name of my iMac.


Example: It starts off as say "My iMac"


Then a half day later, it changes to "My iMac (2)"


Then the next day it will be "My iMac (3)"


And if I open the Finder window, it will show "My iMac" and "My iMac (2)" under "Shared" but if you click on them, nothing happens.


When I go to System Preferences > Sharing the computer name will have the number there "My iMac (3)" and say it can be found as MyiMac-3.local


If I change it back to just "My iMac", the number process starts all over again. I even tried naming the iMac something it was never named before and the same process occurs with the adding of the numbers.


Anyone know how I can fix this?

iMac (21.5-inch, Late 2012), OS X Yosemite (10.10)

Posted on Oct 26, 2014 3:45 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 20, 2017 4:06 PM

Boot into the Recovery Drive. Run Disk First Aid on your internal drive.


Boot into the Recovery Drive by holding down Command R when restarting.


Open Disk Utility

Run First Aid on your internal drive, Macintosh HD

Quit Disk Utility


MORE INFO:

https://support.apple.com/en-us/HT201314


========================================

Remove any accents, apostrophes or special characters in Computer Name.


Check to see if the Computer Name(as seen in the Sharing Preference Pane), Local Host Name and Host Name are the same. The Local Host Name and the Host Name, which is often it's fully qualified name if

on a company network (such as computer.example.com). Often these are identical but they can be different. More Info


Open the Terminal application in Applications/Utilities. Run these three

commands:


sudo scutil --get ComputerName

sudo scutil --get LocalHostName

sudo scutil --get HostName


If the names are different you can try changing using these commands. Copy/paste usually works, but you might need to type out the commands.


sudo scutil --set ComputerName "newname"

sudo scutil --set LocalHostName "newname"

sudo scutil --set HostName "newname"


Reference:

http://osxdaily.com/2012/10/24/set-the-hostname-computer-name-and-bonjour-name-s eparately-in-os-x/

http://stackoverflow.com/questions/40027067/cannot-resolve-local-hostname-after- upgrading-to-macos-sierra

http://osxdaily.com/2010/09/06/change-your-mac-hostname-via-terminal/

106 replies

Nov 14, 2014 1:00 PM in response to farquaad

Tried your workaround but when I open disc utility in recovery mode, Verify Dick Permissions was not highlighted at all so I couldn't activate it... Any idea why? Right disc was selected (Mackintosh HD), etc.


I've been having issues with my MacBookPro having split personalities since installing Yosemite. The worst part is that I am often thrown out of a program I'm using when the system decides that "another device with the same licence number is operating on your network." Or I was thrown out of the internet because "another device uses the same IP address." Getting really tired of it now! 😕

Nov 15, 2014 3:32 AM in response to apo24

Yesterday I got my iPhone-6, and I had to restart my TimeCap (to enter the MAC ID) which serves the home network. After that, my MBP again "was infected" by the name change problem. Like apo24, it seems also in my case that the MBP running Yosemite works fine in "professional" WLANs. I only get the name change problem at home. The home WLAN is set up with two TimeCapsules. It seems now that the trouble is caused by the interplay of Yosemite and Apple Airport access points? One of the two TimeCap's is running 7.6.4 (no newer version compatible), the other is at 7.7.3. They are ONLY WLAN access points, the router is "in" the cable modem.


I did restart both TimeCapsules (as suggested by richard3). Will see ...


I am hesitant to try the sudo (use root permissions as admin) change of com.apple.discoveryd.plist (as suggested by greggtomlinson) because I am afraid of side effects that cause trouble when WLANs other than the home network are used - I hope that 10.10.1 will come soon with a fix for the problem.

(Steve would have took action earlier ... it seems that without his attention to the detail the MobileMe "virus" is spreading at Apple.)

Nov 18, 2014 12:52 AM in response to theshadow82

I suspect the problem with my Mac computer persistently changing it’s name with sequential numbers is that previously I have moved my Mac’s ethernet cable from the ISP-provided router to the Apple Extreme router (which I use in bridge-mode). I had to do this because the Apple Extreme creates the WiFi network which I use for homesharing, but my Apple TV was unable to access my Mac unless I turn on my Mac’s WiFi.


In this problem with the Apple TV, the problem was solved after I switched my Mac’s ethernet cable from the ISP-provided router to the Airport Extreme router. I can know turn off the WiFi on my Mac. (I use two routers because I have to use my ISP-provided router to be connected to the internet, and Apple Extreme provides me with a more reliable WiFi network).


I now suspect my Mac is persistently changing its name with sequential numbers as a consequence of the above actions. My two network routers probably now thinks I have three Mac(s); Two Macs with ethernet connection to each router, and a third Mac on WiFi.


This is what I did to clean up the problem.


  • I disconnected the power to both routers; power them down.
  • I go to System Preferences >> Sharing … and took out the sequential number from my Mac’s name. Important: Make a note of your current Mac name, in my case it was user-iMac.
  • I go to my MacIntosh HDD >> Library >> Preferences >> SystemConfiguration … and deleted the following files:
    com.apple.airport.preferences.plist
    NetworkInterfaces.plist
    preferences.plist
    I emptied the Trash Bin. Don’t worry, these files will be re-created.
  • I now do a re-boot of my computer.
  • After the computer has come back on, and with the routers still powered down, I note that my computer has been renamed as: iMac. I changed the name back to user-iMac. (If you do not go back to the previous name, you will not be able to access your Time Capsule files).
  • Now I powered my routers back on.


And it worked. No more sequential names popping up.


This insight after reading this article at CNet: http://www.cnet.com/news/tackle-a-macs-name-changing-with-sequential-numbers/

Nov 20, 2014 5:04 PM in response to farquaad

I had the problem with one of my two iMacs since upgrading to Yosemite from Mavericks. Since further upgrading to 10.10.1 it's happening more frequently.

I tried removing the bracketed number in the Sharing preferences but soon as I removed it the number would increment a few times again.


I noticed a difference between the two computers: the one with the problem had the File Sharing options for both smb and afp selected, the other only had afp selected.

I removed the smb selection (my network is all mac) and the server number stopped changing (for 12 hours, so far).

Nov 20, 2014 5:33 PM in response to JayUSA123

On the contrary, it's happening more frequently since I 'upgraded' to 10.10.1.

As reported in my previous post, I turned off SMB in the file sharing options, and the name shown in the Sharing preference has not changed since.

However, since rebooting just now, name (2) and name (3) reappeared in the finder under 'Shared' (while the name is still unchanged in the Sharing preference) and SMB has reenabled itself!

Nov 23, 2014 1:58 AM in response to richard3

Hi,

has someone seen that the "name change trouble" correlates with inaccessibility of TimeCap/Airport via AirPort-Utility?


I saw that the name change had happened again, this time also our Apple-TV was affected (an older one at 6.2.1 - a restart did fix the changed network name which was NOT displayed by Apple-TV itself). The TimeCap is still available in the network and even TimeMashine backups work, but in AirPort-Utility the TimeCap is either "was previously available in this network", or it keeps "Reading settings on ...". A hard reset (remove from power) is required to get the TimeCap back to normal.

Nov 27, 2014 6:24 AM in response to greggtomlinson

while this seems to be working for me, I am curious: are there other undocumented commands such as:


sudo /usr/libexec/PlistBuddy-c "Add :ProgramArguments: string --no-cpu-explode-between-midnight-and-noon"/System/Library/LaunchDaemons/com.apple.discoveryd.plist


which turns bugs into features after release of the OS?

re-categorizing bugs as features in this manner, is a traditional Microsoft tactic.

I guess I expect better of Apple.

Nov 29, 2014 12:33 AM in response to theshadow82

Things to try:

Removed files below located within /Library/Preferences/SystemConfiguration/

- com.apple.airport.preferences.plist
- com.apple.network.identification.plist
- com.apple.wifi.message-tracer.plist
- NetworkInterfaces.plist
- preferences.plist


Restart and test.


OR:


Launch terminal and type the following commands, after each line, hit return.


sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist


sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist


Restart and test.


Hope this helps.

My iMac's computer name keeps changing automatically after Yosemite upgrade

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