I've tried this several times but on each occasion, within seconds, the name reverts to the bracketed form, even if you click on the lock to prevent further changes.
I've noticed that in Library/Preferences/SystemConfiguration there's a file called com.apple.smb.server.plist which reads:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowGuestAccess</key>
<false/>
<key>DOSCodePage</key>
<string>437</string>
<key>EnabledServices</key>
<array>
<string>print</string>
<string>disk</string>
</array>
<key>LocalKerberosRealm</key>
<string>LKDC:SHA1.4C603C429CD6BBCA9B2EAE81EF806E002E8940D4</string>
<key>NetBIOSName</key>
<string>IMAC-958F8F</string>
<key>ServerDescription</key>
<string>****** ******** iMac (3)</string>
</dict>
</plist>
The asterisks are mine. I have tried to delete the brackets but the file is protected. Is this the cause or merely another symptom?