Thursday, October 30, 2003

The solution to the hostname problem

The problem with my iMac's hostname has been corrected, but it was using the brute force method instead of the "right way" (whatever that may be).

On the suggestion of a Macfixit forums reader, I decided to go edit the /etc/hostconfig file. I'd looked at that earlier, and the first non-comment line in the file is:

HOSTNAME=-AUTOMATIC-

There's a comment above that the contents of the file are generated by the system control panels. So I'd initially decided to leave it alone. But after reading the suggestion, I went in and changed it to:

HOSTNAME=macdaddy (the name of the Mac)

Now, in order to edit the file (I really hate using vi), I copied it into a visible directory, opened it, and then did a "save as" to save the edited file - the original is owned by root. The new file is owned by me. So I took the edited file, mv'd it back to /etc, then chmod'ed the new hostconfig file back to root:wheel ownership. After a reboot all was well.

I would like to figure out what caused the problem in the first place, so I can correct the underlying cause.

No comments:

There was an error in this gadget