Page 1 of 1

Hostname changed but I didn't do it.

Posted: 2018/08/30 20:31:34
by Latenights
A mysterious issue and possibly should be asked in security forum. I used KTorrent to download a live CD image for Debian. I then used that live CD for a day. When I logged back into Centos 7 the hostname command says "debian". The Internet says the permanent hostname is in /etc/hostname. My /etc/hostname says "localhost.localdomain". Yet:

[user@debian ~]$ uname -a
Linux debian 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Where is the hostname "debian" stored and how could it have gotten changed? Why is it not the same as in my /etc/hostname? Could my ISP have assigned my machine hostname as debian when I used the live CD?

Re: Hostname changed but I didn't do it.

Posted: 2018/08/30 23:38:45
by Latenights
A simple test, reboot the machine with the network disconnected. The default localhost name is back. Between boot-up, something on the network saves my last hostname and sends it back to me. The cable modem? The ISP? Does it work this way for others?

Re: Hostname changed but I didn't do it.

Posted: 2018/08/31 00:59:39
by TrevorH
It's done a reverse lookup on its own ip address and found it in dns as 'debian'.