aspose file tools*
The moose likes Mac OS and the fly likes where does OSX get the hostname? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "where does OSX get the hostname?" Watch "where does OSX get the hostname?" New topic
Author

where does OSX get the hostname?

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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

Joined: Jan 10, 2002
Posts: 61433
    
  67

SystemPreferences -> Sharing

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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

Joined: Jan 10, 2002
Posts: 61433
    
  67

The .local is its Bonjour name.

Domains are controlled by DNS, not the system itself.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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

Joined: Jan 10, 2002
Posts: 61433
    
  67

Wikipedia can likely do a better job than I.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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

Joined: Jan 10, 2002
Posts: 61433
    
  67

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!
 
wood burning stoves
 
subject: where does OSX get the hostname?