I just came across a strange quirck:
I use my MacBook Pro in the office. Every computer is assigned their IP addresses by a DHCP server. It seems to be the case now, however, that my OS X changed my hostname by itself.
I am assuming this is done because of the fact that my current IP address was previously used by the user with this hostname, but obviously, I don't want OS X to change my hostname without asking me to do so.
How can I prevent this from happening?
sudo scutil --set HostName your-preferred-host-name.sudo scutil --set HostName …solves the problem for me, on Lion.