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 > macOS > Hostname stuck! Not the average "hostname" question

Hostname stuck! Not the average "hostname" question
Thread Tools
altoid
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Brooklyn
Status: Offline
Reply With Quote
Nov 17, 2001, 11:49 AM
 
Okay, so this is new on me and I'm hoping someone else has seen this sort of thing. Last week my 10.1 comp was renamed to shop-kenwood-usa.com.backup.ladc.eni.net and I have NO idea how. No one has access to this computer but me.

For other OSX related problems I decided to reinstall X, so I left my OS9 system intact, deleted all OSX files (including all the invisible ones) off the partition, installed X, then 10.1 - my host name was STILL set to shop-kenwood... What is up w/ that? In rc.boot the hostname to be set is "localhost" and in ths host file it's set to AUTOMATIC. I have a static IP and my TCP/IP is configured manually. Inside a the directory: /Network/Servers is a file (that appears to be a link) called shop-kenwoodusa-com.backup.ladc.eni.net that has full r/w/x permissions across the board. It points to root: shop-kennwood...eni.net -> /

Can't figure out how to unlink this file and I can't delete it - i think it's a hard link.

I would really like to get rid of this!! Some where there is a computer name "upload-kenwoodusa-com.backup.ladc.eni.net" that is showing up in tcpdump (which for some reason now only runs if I tell it specifically which device to listen on (even tho I only have the one network card)).

This line shows up in tcpdump often: upload-kenwoodusa-com.backup.ladc.eni.net.1532 > shop-kenwoodusa-com.backup.ladc.eni.net.snmp-trap: Trap(7) E: [|snmp]

I'm not sure what this means, but it's making me feel pretty uneasy. I have not done any special tweaking to this system.

Does anyone have a clue what's going on? - or at the least, how i might fix this?
     
Camelot
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Nov 17, 2001, 05:05 PM
 
Despite what your rc setup says, Mac OS X will set your hostname (at least in Terminal's command line prompt) to be the reverse DNS lookup of your IP address.

You say you have a static IP? Check with your ISP's DNS folks to see what they're doing with DNS. They might have screwed up their DNS tables somehow.

As for the TCPDump stuff, don't worry about what it says. It uses the same name lookup routines as the rest of the OS, so if the DNS says you're a particular machine, so will TCPDump.
Gods don't kill people - people with Gods kill people.
     
altoid  (op)
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Brooklyn
Status: Offline
Reply With Quote
Nov 17, 2001, 06:20 PM
 
Well... okay, i see what yer sayin'... only thing is that the IP of my mac is a NAT'd IP# of the 192.168.x.x variety - as are all the computers on this network, so by the reverse DNS lookup logic, all my machines would share that host name (I guess)...

Hrmmm, this is frustrating... anyone else have any ideas on this sort of thing?

edit: If this IS because of the reverse dns look up business, is there anyway I can override it so I can give it its real host name back?

[ 11-17-2001: Message edited by: altoid ]
     
altoid  (op)
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Brooklyn
Status: Offline
Reply With Quote
Nov 19, 2001, 01:42 PM
 
anyone?
     
rantweasel
Dedicated MacNNer
Join Date: Oct 2001
Location: Philly
Status: Offline
Reply With Quote
Nov 19, 2001, 06:07 PM
 
Originally posted by altoid:
<STRONG>Well... okay, i see what yer sayin'... only thing is that the IP of my mac is a NAT'd IP# of the 192.168.x.x variety - as are all the computers on this network, so by the reverse DNS lookup logic, all my machines would share that host name (I guess)...

Hrmmm, this is frustrating... anyone else have any ideas on this sort of thing?

edit: If this IS because of the reverse dns look up business, is there anyway I can override it so I can give it its real host name back?

[ 11-17-2001: Message edited by: altoid ]</STRONG>
If your IP is an RFC1918 IP (like 192.168.x.y), then it can't be a reverse lookup issue. So that's not it. If it's a symlink, just rm it. If it's a hard link, I think you want ln -f, although check the ln manpage. It should just be a symlink, judging from the name. Try removing/unlinking it and see what happens.
     
altoid  (op)
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Brooklyn
Status: Offline
Reply With Quote
Nov 19, 2001, 09:22 PM
 
Thanks for that idea, but I decided to try changing my DNSs and that ended up solving the problem. I can only assume that because these are special, internal only IPs (192.168.x.x) that the host assignment was intended for whatever computer was using static IP - as it is the router that using that IP to handle traffic sent to/from the Internet it seems the router was just passing along the host name assignement like a router should.

Because the host was set to that odd kenwoodusa name even after a system reinstall, I can only assume that if I did manage to unlink that file and/or delete it, it would just reappear the next time I rebooted anyway. Though if this happens again I'll definetly give it a shot.

The look up tables at my original DNS must be scrwed up or something, that's all I can figure it to be...

In anycase, using different DNSs was the solution for me.
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Nov 20, 2001, 01:24 AM
 
Yeah, this happened to me when I was hooked up directly to the 'Net (i.e., no router between me and the external IP) on a friend's cable modem...I "fixed" it by typing

sudo hostname localhost

(localhost could be whatever you want) in the Terminal. Of course, when I initiated a new connection again, my computer renamed itself once more...

:]
[Wevah setPostCount:[Wevah postCount] + 1];
     
ndptal85
Dedicated MacNNer
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Nov 20, 2001, 10:12 AM
 
Finally figured it out. I wanted my hostname to be Alexander but no matter what I tried it wouldn't stick so I hunted down any place I could find "localhost" and changed it to "Alexander". That involves /etc/hostconfig, /etc/rc.boot and Netinfo Manager.

In /etc/hostconfig I have my hostname set to -Alexander-
In /etc/rc.boot I have it set to just Alexander
And in the Netinfo Manager go to machines in the column menu's choose "machines" and where you see localhost in the name field change that to what you want it to be, in my case Alexander. Now reboot and it should show up as what you want it to be.
Main Computer and EyeTV 200 DVR: Mac Mini Core Duo 1.66Ghz 2GB Ram 160GB HD.
Road Warrior: MacBook White 2.0Ghz Core 2 Duo 2GB Ram 80GB HD.
Kubuntu Book: Dell Lattitude C400 running Kubuntu Linux 6.06 1.33 Pentium 3 CPU 1GB RAM 40GB HD with Creative laptop speakers (it only has one speaker).
     
Camelot
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Nov 21, 2001, 04:37 PM
 
Originally posted by altoid:
<STRONG>Thanks for that idea, but I decided to try changing my DNSs and that ended up solving the problem. I can only assume that because these are special, internal only IPs (192.168.x.x) that the host assignment was intended for whatever computer was using static IP - as it is the router that using that IP to handle traffic sent to/from the Internet it seems the router was just passing along the host name assignement like a router should.

Because the host was set to that odd kenwoodusa name even after a system reinstall, I can only assume that if I did manage to unlink that file and/or delete it, it would just reappear the next time I rebooted anyway. Though if this happens again I'll definetly give it a shot.

The look up tables at my original DNS must be scrwed up or something, that's all I can figure it to be...

In anycase, using different DNSs was the solution for me.</STRONG>
You didn't have to believe my original post, but...

... the fact you changed your DNS server setting and the problem went away PROVES it was a DNS problem.

The fact is that the DNS server you were using is misconfigured.

Assuming you are using your ISP's DNS server, my guess is that they ALSO use RFC1918 addresses (192.168.x.x) internally in their offices so they've setup reverse DNS for the 192.168.x.x network - which is fine.

However, they should configure their DNS so that this private-class network does not leak into the outside world. This is quite easy to do (using BIND) through either Split DNS or 'views' - both of which allow them to serve different DNS data to different sets of users, i.e. the 192.168.x.x to their own internal systems and not to outside users.

The whole point of RFC1918 is to define private class addresses and therefore they should be just that - private - and not open for the whole world to see.

You should contact the administrator of the DNS server in question and tell them they're leaking RFC1918 addresses just in case they're not aware.
Gods don't kill people - people with Gods kill people.
     
rkt
Mac Enthusiast
Join Date: Oct 2000
Status: Offline
Reply With Quote
Nov 22, 2001, 08:27 AM
 
Originally posted by ndptal85:
<STRONG>In /etc/hostconfig I have my hostname set to -Alexander-</STRONG>
um. just wanted to double check something; your hostname in /etc/hostconfig should not have dashes either side of it...

ie.
HOSTNAME=Alexander
*not*
HOSTNAME=-Alexander-

this could be the root of your problems. the default is to have...

HOSTNAME=-AUTOMATIC-

...the dashes are there so the system knows you want it to get the hostname automagically as opposed to you wanting your hostname to be AUTOMATIC.

to successfully change your hostname you should only have to alter that line (and nothing else). if you change "localhost" elsewhere you'll probably break things...

/btw/ if you change your hostname to something that isn't a real dns entry for your machine things *will* complain. both apache & sendmail (and others) are pretty touchy about this!
     
Alex Duffield
Grizzled Veteran
Join Date: Oct 2000
Location: Vancouver
Status: Offline
Reply With Quote
Nov 23, 2001, 02:25 AM
 
Originally posted by rantweasel:
<STRONG>

If your IP is an RFC1918 IP (like 192.168.x.y), then it can't be a reverse lookup issue. So that's not it. If it's a symlink, just rm it. If it's a hard link, I think you want ln -f, although check the ln manpage. It should just be a symlink, judging from the name. Try removing/unlinking it and see what happens.</STRONG>
Not true at all. I run a intranet at our office, and all systems have 192.168.x.x address. All systems have reverse lookup set up. For OSX Server this is REQUIRED.

It seems to me that it is definatly caused by your reverse DNS.
Alex Duffield
http://www.incontrolsolutions.com
Fatal error: Call to undefined function: signature() in /usr/local/www/htdocs/showthread.php on line 813
     
   
 
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
Top
Privacy Policy
All times are GMT -4. The time now is 01:57 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,