Re: How to get Fedora 35 to use DNS name as hostname?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/24/22 09:50, Petr Menšík wrote:
One key difference might be enabled systemd-resolved by default in
Fedora 34, but it is not in RHEL9. I think it should not be related
directly. But could it?

What does hostnamectl report after installation? What it thinks the
hostname is? Would the behaviour change if you disable systemd-resolved
and reboot?

I just did a fresh kickstart of F35 Server. I didn't do anything to set the hostname during installation. 

At first boot, I could see that the hostname was set to the reverse DNS-provided hostname "hostxxx.tc.camerontech.com" - this is normal and expected.

When I log in via ssh or on the KVM console, the hostname is hostxxx.tc.camerontech.com UNITL I REBOOT.

Once I reboot, the hostname is set up "fedora" with no FQDN. I am assuming it's somehow being set because of the lines in /etc/profile where the hostname is set, but I'm not sure.

I looked at the hostname-mode option of NetworkManger.conf, but I've tried various settings and it doesn't seem to work. From the man page:

hostname-mode
  Set the management mode of the hostname. This parameter will affect
  only the transient hostname. If a valid static hostname is set,
  NetworkManager will skip the update of the hostname despite the
  value of this option. An hostname empty or equal to 'localhost',
  'localhost6', 'localhost.localdomain' or 'localhost6.localdomain'
  is considered invalid.

  default: NetworkManager will update the hostname with the one
  provided via DHCP or reverse DNS lookup of the IP address on the
  connection with the default route or on any connection with the
  property hostname.only-from-default set to 'false'. Connections are
  considered in order of increasing value of the hostname.priority
  property. In case multiple connections have the same priority,
  connections activated earlier are considered first. If no hostname
  can be determined in such way, the hostname will be updated to the
  last one set outside NetworkManager or to 'localhost.localdomain'.

  dhcp: this is similar to 'default', with the difference that after
  trying to get the DHCP hostname, reverse DNS lookup is not done.
  Note that selecting this option is equivalent to setting the
  property 'hostname.from-dns-lookup' to 'false' globally for all
  connections in NetworkManager.conf.

  none: NetworkManager will not manage the transient hostname and
  will never set it.

I've set the hostname-mode to "default" in the NetworkManager.conf file and rebooted but it doesn't make any difference.

Here are screenshots: https://imgur.com/a/gRzswnI

Thomas

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux