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 > strange host name at terminal prompt!

strange host name at terminal prompt!
Thread Tools
Junior Member
Join Date: Feb 2003
Location: Ann Arbor, Michigan
Status: Offline
Reply With Quote
Mar 31, 2003, 09:53 AM
 
Started up Terminal this morning and noticed that the host name that appeared at the prompt was not the usual one, but a host name I have never heard of. Searching the directories showed I am, in fact, connected to my own computer. Checking the computer name in System Preferences - Sharing showed that it has not changed. Doing a finder search for visible and invisible files with this new host name turned up nothing.

So how could this happen? Is it a hack? and how can I restore the orignal host name?
     
Forum Regular
Join Date: Aug 2002
Status: Offline
Reply With Quote
Mar 31, 2003, 11:27 AM
 
If you look in /etc/hostconfig

by default it should be something like:
HOSTCONFIG=-AUTOMATIC-

To reset it you'll need to edit the file as root
su root
<password>

launch your favorite text editor

pico /etc/hostconfig

edit the line HOSTCONFIG=-AUTOMATIC- to HOSTCONFIG=your_hostname

ctrl + x

save

Hope that helps
     
topcat  (op)
Junior Member
Join Date: Feb 2003
Location: Ann Arbor, Michigan
Status: Offline
Reply With Quote
Mar 31, 2003, 12:26 PM
 
It doesn't seem to be a problem with /etc/hostconfig. I looked there and it contains the line:
HOSTCONFIG=-AUTOMATIC-

There is no mention of the strange host name in the file and the rest of it looks reasonable as far as I can tell.
     
Dedicated MacNNer
Join Date: Jan 2003
Location: San Francisco
Status: Offline
Reply With Quote
Mar 31, 2003, 02:02 PM
 
i think he meant for you to change it from AUTOMATIC to the name you desire because when it automatically grabs a host name it will correspont to whatever network your on. is this accurate?
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
Mar 31, 2003, 02:47 PM
 
Sounds to me like it just picked up the DNS name of whatever DHCP address your service provider gave you.

That's quite common, and nothing to worry about.

Wade
     
topcat  (op)
Junior Member
Join Date: Feb 2003
Location: Ann Arbor, Michigan
Status: Offline
Reply With Quote
Mar 31, 2003, 08:06 PM
 
Some progress, but I still don't get it!

First, apologies for not really grasping Voth's reply at first read.

Second, it looks like TeknoTurd and wadesworld are right - the host name is being picked up from the DNS. If I disconnect from the network and start Terminal, I get the expected prompt.

But I don't like having a weird hostname, so I followed Voth's suggestion and edited /etc/hostconfig. This didn't change anything when I restarted Terminal, so I rebooted. Surprise! Now when I start Terminal, the prompt reads "localhost:~", not the host name I put into /etc/hostconfig.

Any thoughts?
     
   
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 11:11 PM.
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