Score:0

hostname changed without me changing anything

US flag
user969856

My hostname changed to "cpe-172-101-0-1.maine.res.rr.com systemd-resolved" without my consent on fedora 37. When i type journalctl -u systemd-hostnamed.service

journalctl -xe entry is:

févr. 05 16:27:25 cpe-172-101-0-1.maine.res.rr.com systemd-hostnamed[18393]: Hostname set to <cpe-172-101-0-1.maine.res.rr.com> (transient)
févr. 05 16:27:55 cpe-172-101-0-1.maine.res.rr.com systemd[1]: systemd-hostnamed.service: Deactivated successfully.
févr. 05 16:32:51 cpe-172-101-0-1.maine.res.rr.com systemd[1]: Starting systemd-hostnamed.service - Hostname Service...
févr. 05 16:32:51 laptop-fedora systemd[1]: Started systemd-hostnamed.service - Hostname Service.
févr. 05 16:32:51 laptop-fedora systemd-hostnamed[18679]: Hostname set to <laptop-fedora> (transient)

How can this happen ?

Zareh Kasparian avatar
us flag
I see "cpe-...." in your logs. are you connecting your laptop to a modem or something provide you with an IP address?
Score:1
cw flag

Fedora simplified the old install process and skips setting a hostname. As you can see, it is showing the transient hostname in both cases. Per the hostnamectl manpage, the transient hostname is a fallback received from the network configuration if there is no static hostname set.

You should manually set a hostname. This can be done by running sudo hostnamectl hostname HOSTNAME (where HOSTNAME is whatever you want it to be). This will update the static hostname and takes priority over transient ones, and will not change.

HPVectra avatar
cw flag
You can check the man page for hostnamectl - https://www.freedesktop.org/software/systemd/man/hostnamectl.html#
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.