To change the hostname open Terminal.app, su to Root or use sudo depending on how your system is set up and edit /etc/hostconfig using vi. In there you will see a section which reads like this:
# Network configuration
HOSTNAME=-AUTOMATIC-
ROUTER=-AUTOMATIC-
Change the HOSTNAME= line to...