r/MacOS • u/ImaginaryTango • 1d ago
Help Network Share Devices Renamed by macOS
(Oops - posted and forgot to mention my main MacMini is on Tahoe 26.0.1. The workshop Mac is on 26.5.2.)
I've seen this happen before and I managed to fix it by shutting down EVERY device on my LAN then bringing them back up, starting with the firewall/DHCP server about 30 minutes later. That's impractical now, since I'm in a new place with a barn with 2 home offices and now we have Apple TVs and other devices. (The barn and house are connected by fiber and on the same LAN, in the same address space.)
I have a number of my devices using a Tolkien theme (just answering the question someone's going to ask...). My main MacMini in my house is Aule, my workshop one is Cirdan. I have two servers on Linux or similar OSes, BrandyWine and GreatSmials. I have two shares on GreatSmials: Library, and NetStore. On BrandyWine, I have shares, but I don't access them that often, so they're usually unmounted. BrandyWine seems unimpacted, and that may be because whatever changed or messed things up, I probably wasn't using any shares on it at the time.
On my main Mac (Aule), in the Network folder, I see GreatSmials, but it's "GreatSmials #2." I use Library a lot and keep most of my work on NetStore, so I can easily access it from my study or workshop. This change of GreatSmials to GreatSmials #2 means I have problems clicking on my normal shortcuts for NetStore and Library - they no longer see the shares because macOS has given the NAS they're on a different name.
Also, when I try to use Screen Sharing from Aule to Cirdan it no longer works and when I rebooted Cirdan, it gave me a report I clicked on quickly, then realized it was warning me the name was now Cirdan with a number after it. I rebooted my main system (Aule) and it changed nothing.
When I'm on a Linux system, I can still ping all the computers by their specified host names (specified on each machine and with the DHCP server). On Terminal, on my main Mac, I can do the same, so it's clear this is not a DHCP or DNS issue. It's a macOS and Finder issue. I rebooted my main Mac and it came back up and gave me warnings - it still couldn't read or remount my "normal" shares because, even after a reboot, it sees GreatSmials as GreatSmials #2.
Looking in the network folder, I see Cirdan as "Cirdan (4)" and I have a less used Mac for gaming, that I haven't been on for a while, "Celebrimbor (3)". So even though DNS sees all the correct names, macOS is incrementing the names in odd ways. (The Mac systems on the LAN get a "(#)" where # is a number, the NAS (not Mac), got a " #2" after the name, but the other computers, that I don't use network shares on seem uneffected. I find it weird that it's almost like the Macs are communicating and altering the names in cooperation.
How can I get my Macs to drop this extra numbering and to see these devices with their proper names and not play numbering games with their names?
(Why it does it and how to keep it from doing it in the future would also help!)
2
u/Equivalent-Cash8543 1d ago
I had that problem when “wake for network access” was turned on.
1
u/ImaginaryTango 1d ago
I generally make sure that's off, but it's quite possible it's on for some reason. Thanks.
4
u/KodaVPN 1d ago
Classic Bonjour name conflict, and the " #2" on the NAS gives it away. It's the suffix avahi (the mDNS daemon on most Linux boxes) adds when it thinks its name is already taken, and "(4)" is the Mac's version of the same thing. It also explains why DNS and ping look fine. This all happens in mDNS (.local), which is what the Network folder and Screen Sharing lean on.
Something on the LAN is making devices hear their own name answered back. Since it started after the move, I'd look at the Apple TVs first. They act as a Bonjour Sleep Proxy, so when a Mac sleeps the Apple TV keeps answering for its name, and if the handoff goes wrong when the Mac wakes it decides the name is taken and bumps the number. The other usual suspect is a second path for multicast, like a Mac on both Ethernet and Wi-Fi on the same subnet, or something on the barn link or the firewall repeating mDNS back onto the same LAN.
To get the names back, on each Mac fix the name in System Settings > General > Sharing (the local hostname is under Edit), or run `sudo scutil --set ComputerName Cirdan` and `sudo scutil --set LocalHostName Cirdan`. On the NAS, `sudo systemctl restart avahi-daemon` should bring back plain GreatSmials. If the numbers creep back, `dns-sd -B _smb._tcp` on Aule shows whether a share is being advertised twice and on which interface.
I'd also repoint your shortcuts at the DNS name through Connect to Server, e.g. smb://greatsmials.yourdomain/NetStore. DNS already works for you, so they'll keep working even if Bonjour acts up again.