Description of problem: systemd now provides an NSS module for doing lookups of the machine hostname. This module, nss_myhostname.so.2 is extremely handy and should be the default on the system so that services can always find the address of the current machine by its hostname. Version-Release number of selected component (if applicable): glibc-2.20-5.fc21.x86_64 How reproducible: Every time Steps to Reproduce: 1. Install Fedora 2. hostnamectl set-hostname <something> 3. getent hosts <something> Actual results: Nothing Expected results: The IP addresses of the machine. Additional info: Among other things, this simplifies a common setup problem for FreeIPA, which is that in order to set it up, there needs to be forward and reverse host information available.
Stephen, Sorry, I don't quite understand what's missing. Fedora 21 should have had libnss_myhostname.so.2 provided by systemd-libs, and the install should have added myhostname to the end of `hosts:` in /etc/nsswitch.conf. Given that Fedora should have systemd-libs installed by default, I would expect myhostname to be installed by default and work correctly. On my F20 system I have libnss_myhostname.so.2 installed from systemd-libs, and it correctly configured /etc/nsswitch.conf e.g. `hosts: files dns mdns4_minimal myhostname` such that `getent hosts <hostname>` returns all the configured IP addresses of the machine. What's missing?
What's missing is that a default install of Fedora (21) does not have this in the nsswitch.conf when it boots up after installation. If this is part of the defaults in the package, then something is removing it during installation. We need to track this down and fix it. CCing Tomas Meaz in case this is an authconfig issue.
nsswitch.conf is still managed by authconfig so if any package wants to add some entry to it by default it needs to have this change added to authconfig as well. So this is basically problem of systemd-libs guys that they did not notify me about this new requirement for authconfig. Now that I know about this requirement, I can add it.
Tomas, would you please add this soon so we can verify it and make sure it's ready for Fedora 21 Final? This is a really useful feature (and makes setting up FreeIPA somewhat easier).
authconfig-6.2.9-4.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/authconfig-6.2.9-4.fc21
Package authconfig-6.2.9-4.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing authconfig-6.2.9-4.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-14343/authconfig-6.2.9-4.fc21 then log in and leave karma (feedback).
authconfig-6.2.9-4.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.