(I'm using a Mac. It triple boots OS X.8, Gentoo, and Windows 7. I've only noticed the problem in OS X, but that's what I use most of the time so it might be occurring in other OSes.)
I've used System Preferences to set my host name to what I want it to be. Yet, when I connect to particular networks (parent's house, dorms, school, etc), as far as Darwin is concerned, my hostname becomes something else. I say Darwin because Terminal and the sharing panels in System Preferences ('Other users can [some sharing action] your computer [some address involving the altered hostname]'). Sometimes the altered hostname is a lower case version of what it should be, sometimes its host1234.some.provider.com, or just host1234.
This frustrates me. I want my hostname to be what I set it to, always, across all systems. Especially in Mac. What can I do to prevent this alteration? I have (root) access to a server with BIND on it, so should I set up dynamic global hostname? Are there any guides to setting up BIND for that (RFC 3007)? I (mostly) understand DNS as applied to websites, etc, but I've only ever altered the bindings in CPanel.
UPDATE: I'm not complaining about clients showing fully qualified host names. My local machine is showing a different host name. Lets say my computer's hostname is set to be Firelizzards-Computer
in OS X's equivalent of /etc/hostname
. Right now, connected to my dorm's WiFi, running hostname
returns host-173-230-36-89.mycampusname.clients.myprovider.com
(my LAN address is 173.230.36.89
). Why is hostname
not returning Firelizzards-Computer.mycampusname.clients.myprovider.com
?
NOTE: The phrase 'dynamic global hostname' refers to a setting in OS X that involves RFC 3007.
SOLUTION: sudo scutil --set HostName <desired host name>
. I found this, this, and this, the last one being my exact problem.
So now my question is, by what mechanism is connecting to a LAN changing what hostname
was returning?