Names on Mac

ISSit
ISSit used Ask the Experts™
on
We have the strangest of situations.  We have received and imaged 30 macBook systems using DeployStudio.  Looking at several of the systems, the name of the system is different from what is in the Sharing - Computer Name and what shows up when you check Remote Login.  In this case the verbage is- Computer Name: teachspare-mac02, Remote login:  "To log in ... type ssh admin@mc09-macsys-16...
If I check terminal the mc09 name is there.  Stranger still is that if I click edit under Sharing and then click okay, the name mentioned above on remote login changes briefly and then back to mc09... as if it was picking this up from somewhere.  Cannot remote control systems.  How can we fix this naming inconsistency?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Check the /etc/hosts file on the machine, or maybe you have a local DNS server.  The name in the ssh command is coming from the /etc/hosts file or possibly DNS.  

Change the /etc/hosts to be consistent with the name you desire.
Do you have more than one account on the Mac?

Author

Commented:
Strung:The systems were newly imaged, so there are no other accounts

et01267: isn´t the /etc/hosts associated with pc´s?

Author

Commented:
et01267, sorry, I am relatively new to Macs so did not realize.  I see the hosts file on my home system, will check the problem system tomorrow.

Commented:
Who is setting the computer names? Is your deploy studio giving out names or is the server?
Have you tied the names to the mac addresses?

The way I do it, I use apple net restore, I setup computer names first and let the server give out all the names. I image a computer and when I need to reinstall, they would all get their names via server.

My main poit is check who is giving computer names out, in server admin, under preferences for computers.


You definitely have a local DNS server there, most probably tight to DHCP server which is giving away IP addresses. Maybe a Windows server?
Commented:
If it is DNS, then it is might be the reverse DNS mapping. But this would only be true if you have static IP addresses configured in your machines, or your DHCP server has the machine's MAC addresses bound to specific IPs.

If you give one of these Macs a static IP that is not in the DNS (or the /etc/hosts file), the sharing page will tell you that the ssh command is "ssh whoever@<ip address>".

Anyway, if you have a DNS server then the ssh command should be usable from other machines on the network since that's how other machines will know these Macs.  If you try to fix this by just hacking the /etc/hosts, the machine may tell you you can use "ssh whoever@<name you set>" but no other machines on the network will know that name and will not be able to use that command.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial