0

I just set up eduroam on my laptop and this morning when I fired up my terminal, I noticed that my hostname has been changed most probably by the eduroam set up to a new value. Any ideas why or how this happens?

cobie
  • 7,023
  • 11
  • 38
  • 60

1 Answers1

1

You're going to get a new hostname every time you join a new network (at least potentially). The hostname identifies the computer and is therefore assigned by the network that you connect to. This usually happens as part of DHCP, where you get an IP address and routing information.

This is perfectly normal and nothing to worry about. If you absolutely need a certain hostname, talk to the network administrators.

Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204
  • I think you are mistaken. The hostname as is, is set by the administrator of the particular device (PC) and it does not change, with connection to a new network. The fully qualified domain name changes, though (foo.company.net). – Nejc Sep 13 '12 at 15:29
  • 1
    At least for some networks it changes -- one of them being eduroam. It's the same for me despite having set a hostname for the machine. It may depend on the configuration of your machine. – Lars Kotthoff Sep 13 '12 at 16:03
  • Maybe so, but I do not see how it would be possible for network or a script to change the hostname, since you need root priviliges. – Nejc Sep 14 '12 at 09:25
  • You similarly need root priviledges to change the IP address of an interface, yet this happens regularly when you connect to a network. – Lars Kotthoff Sep 14 '12 at 09:31
  • You have a point there, but nevertheless, hostnames are used only for humans (for identifying computers). Computers use MAC and IP addresses for identification and packet transmission. So from here I do not see the point of changing the hostname of a computer. But I am now convinced that this could be done. :) – Nejc Sep 14 '12 at 12:25