Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Getting the proper hostname

Getting the proper hostname
Thread Tools
Mac Enthusiast
Join Date: Jul 2002
Location: Leiden, Netherlands
Status: Offline
Reply With Quote
Oct 18, 2004, 01:41 PM
 
Hi,

my webserver runs jaguar [10.2.8], has a static IP and a name in one of my domains. Currently the hostname command returns host.local instead of host.mydomain. I have severl scripts that uses the hostname command to find the name of the server they are running on. I would like to configure my machine so hostname returns the host.mydomain name and *not* host.local. What should I do to achive this little goal ?
     
Mac Elite
Join Date: Aug 2000
Location: Vancouver B.C.
Status: Offline
Reply With Quote
Oct 18, 2004, 03:27 PM
 
The simplest way is to change the computer name in the sharing control panel to the domain you want.
Get busy living or get busy dying
--Stephen King
     
Mac Enthusiast
Join Date: Jul 2002
Location: Leiden, Netherlands
Status: Offline
Reply With Quote
Oct 19, 2004, 01:10 AM
 
Originally posted by Mac Write:
The simplest way is to change the computer name in the sharing control panel to the domain you want.
In the sharing panel I have :
perso.hirlimann.net
perso [.local] for rendez-vous. Do you mean that removing this last entry should do the trick ?
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Oct 19, 2004, 07:59 AM
 
If you're computer has a FQDN (fully qualified domain name), then it should be the output of the hostname command. But if that's not working, you can always do sudo hostname my.domain.com.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:53 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2