Hostname gone weird

Discussion in 'macOS' started by Thomas Harte, Oct 28, 2006.

  1. Thomas Harte macrumors 6502

    Nov 30, 2005
    Hi, I have recently encountered a strange thing in OS X v10.4.8 on my Core Duo MacBook Pro. I don't know when the change happened, but now when I use the terminal the prompt seems to be using "4f9ysjw88y060ke" as my hostname. I have PS1 (the environment variable that bash uses to show its normal prompt) set to the default '\h:\w \u\$ '. The only place I can find in the System Preferences for setting a computer name is in Sharing, but that still says "Thomas Harte's Computer" as I would expect. Neither /etc/hostconfig nor /etc/hosts seem to have anything unusual in them.

    So, what in OS X decides the hostname, and where can I go to change it?
  2. Thomas Harte thread starter macrumors 6502

    Nov 30, 2005
    No, sorry, I meant to say. I found that tip, and several others repeating the same thing already. My /etc/hostconfig doesn't have a line that says "HOSTNAME=-AUTOMATIC-" so in a strict sense I can't actually follow the advice but I'm more curious as to why my hostname has suddenly changed to a string of garbage. My /etc/hostconfig hasn't changed since August 29th (which was quite possibly the day I got this machine) so a change in there can't be the cause.
  3. Compile 'em all macrumors 601

    Compile 'em all

    Apr 6, 2005
    I have had the same problem too. It usually happens when I am having trouble with my ethernet/airport internet connection. I have a powerbook G4 though. Sorry I couldn't help, but at least you know now it is not only you with that problem :D .

Share This Page