Hostname changed but I didn't do it.

General support questions
Post Reply
Latenights
Posts: 10
Joined: 2018/01/25 08:51:48

Hostname changed but I didn't do it.

Post by Latenights » 2018/08/30 20:31:34

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?

Latenights
Posts: 10
Joined: 2018/01/25 08:51:48

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

Post by Latenights » 2018/08/30 23:38:45

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?

User avatar
TrevorH
Forum Moderator
Posts: 30549
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2018/08/31 00:59:39

It's done a reverse lookup on its own ip address and found it in dns as 'debian'.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - General Support”