Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-05-2007, 07:16 PM   #1
stefmit
Triple-A Player
 
Join Date: Dec 2003
Posts: 88
hostname change in Leopard

~subj?!?

Have tried:

<original_hostname>$ sudo hostname <new_name>.<my_domain>.<my_dom_suffix>

which changes it for a terminal session or bash reload, but this is not persistent across reboots. Any ideas?
stefmit is offline   Reply With Quote
Old 11-05-2007, 08:25 PM   #2
stefmit
Triple-A Player
 
Join Date: Dec 2003
Posts: 88
$sudo vi /etc/hostconfig

HOSTNAME=my.host.name
or
HOSTNAME=-my.host.name-
or
HOSTNAME="my.host.name"

did not help, either.
stefmit is offline   Reply With Quote
Old 11-05-2007, 09:08 PM   #3
hayne
Moderator
 
Join Date: Jan 2002
Location: Montreal
Posts: 29,276
You are going to have to give us more details.
Don't just tell us that something "did not help" - instead tell us (or better, show us via copy & paste) what you are doing to test the hostname change, what you expect, and what results you get.
E.g. are you saying that the /etc/host line reverts to its previous value - or that it seems to be being ignored?
I recall a thread on these forums that discussed this sort of issue a while back (probably a year or more) and pointed to the script under /System/Library/StartupItems that handled the hostname setting. I'm guessing that Leopard has done away with StartupItems in favour of launchd scripts.
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 11-05-2007, 09:42 PM   #4
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,845
Have you tried changing your hostname in the Sharing preference pane?
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 11-05-2007, 09:58 PM   #5
stefmit
Triple-A Player
 
Join Date: Dec 2003
Posts: 88
Quote:
Originally Posted by Las_Vegas
Have you tried changing your hostname in the Sharing preference pane?

That was it! Thank you! Can't believe how simple a solution this was - I probably got used to be sitting at the terminal, that I forgot there is a GUI for many things. Interestingly enough, I grep-ed all the obvious places for this (e.g. /etc) and could not find the hostname ...

Thanks again!
stefmit is offline   Reply With Quote
Old 08-07-2008, 12:56 AM   #6
drenalin
Registered User
 
Join Date: Aug 2008
Posts: 1
I found that I needed to edit

/Library/Preferences/SystemConfiguration/preferences.plist

and change the hostname setting there...finally fixed it after I updated that file.
drenalin is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting 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

Forum Jump


All times are GMT -5. The time now is 03:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.