Tom H tomh0665 at gmail.com
Thu Nov 27 09:52:05 UTC 2014

On Thu, Nov 27, 2014 at 12:49 AM, Brandon Vincent
<Brandon.Vincent at asu.edu> wrote:
> On Wed, Nov 26, 2014 at 9:20 PM, Chris <cpollock at embarqmail.com> wrote:
>> Could someone give me an idea as to what this means:
>> kernel: [117952.338279] systemd-hostnamed[22506]: Warning:
>> nss-myhostname is not installed. Changing the local hostname might make
>> it unresolveable. Please install nss-myhostname!
> Chris, this is a known bug [1]. You can safely ignore the warning as
> Ubuntu is no longer recommending nss-myhostname for local name
> resolution.
> [1] https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1277608

Why not simply install libnss-myhostname and have "/etc/hosts" as a static file?

libnss-myhostname is patched in Debian and Ubuntu to associate the
hostname to (as opposed to upstream).

libnss-myhostname has been merged into systemd upstream but is still
packaged separately on Debian and Ubuntu.

The objection to nss-myhostname in Launchpad was before Ubuntu decided
to default to systemd so that view might change.

I don't know how to change the hostname in the Unity GUI but since
Unity's an alternative Gnome shell it must be easy to do so given that
the systemd and Gnome developers generally work together on such
issues. And I imagine that the Unity developers have enough work
without patching such an applet unnecessarily.

>From my laptop, running 15.04 with systemd-as-pid1:

root at yoga:~# cat /etc/hostname

root at yoga:~# cat /etc/hosts  localhost
::1        ip6-localhost ip6-loopback

root at yoga:~# cat /proc/sys/kernel/hostname

root at yoga:~# hostname

root at yoga:~# hostname -s

root at yoga:~# hostname -f

root at yoga:~# hostname -d

root at yoga:~# getent hosts       localhost

root at yoga:~# getent hosts   yoga.lenovo        yoga.lenovo

root at yoga:~# hostnamectl
   Static hostname: yoga.lenovo
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 2b56432c3c8f2d78fd74b0195421239e
           Boot ID: 2aeafa4e96f14f5693f0715b5eb88642
  Operating System: Ubuntu Vivid Vervet (development branch)
            Kernel: Linux 3.16.0-25-generic
      Architecture: x86-64

root at yoga:~# dq -W systemd
systemd 215-6ubuntu1

root at yoga:~# dq -W libn*my*
libnss-myhostname:amd64 0.3-9

More information about the ubuntu-users mailing list