Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where does OSX get the hostname?

 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I first got my Macbook Pro laptop, I entered in a long name for the machine. I can't figure out where OSX stores it. Its not in the usual 'hostname' system



Clearly some part of the networking system properly knows that the hostname is way.pfarrell.com

Yet when I ssh into another host, it thinks that the proper name is "patrick-farrells-macbook-pro.local"

I can't tell if this is the MBP thinking its name is "patrick-farrells-macbook-pro.local",
or if the debian machine things that the MBP has the long name.

I'm having problems with SMTP daemon authentication, so I want to get it correct.

On the debian machine, dig displays the proper DNS resolution. i.e.



and on the MBP, dig resolves exactly the same (as it should).

Where is this long name coming from?
How do I change it?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SystemPreferences -> Sharing

At the top of the pane is a text field that sets the "computer name".
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:SystemPreferences -> Sharing

At the top of the pane is a text field that sets the "computer name".

Getting close.
Now it things the hostname is 'way.local'

So where is it getting the domain?
Can i just name it way.pfarrell.com in that dialog box?

the 'local' domain is unusual if not a bit strange.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The .local is its Bonjour name.

Domains are controlled by DNS, not the system itself.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you translate that? i.e. try again? What's a bonjour?

I clearly have a real DNS entry for way.pfarrell.com, you can dig it from your computer.

Where does the .local come from? I see that there is a bind setup on the MBP, but it doesn't have a zone file for the proper domains. If its just a standard bind setup, I could have it slave off my authoratiative DNS.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following the link, and then on .local
it says:

If a computer running Mac OS X is not assigned a domain name, it identifies itself as hostname.local.

Which brings me back to the start. How do I make it use the assigned domain name?
I want way.pfarrell.com
not way.local
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not a network IT guy so I don't have the answer, but I'm pretty sure that's not governed by the local system but by the network and its DNS servers.

Anyone in-the-know should feel free to jump in!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic