nss-myhostname

Chris cpollock at embarqmail.com
Thu Nov 27 13:14:32 UTC 2014


On Thu, 2014-11-27 at 04:52 -0500, Tom H wrote:
> 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 127.0.1.1 (as opposed to 127.0.0.2 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
> yoga.lenovo
> 
> root at yoga:~# cat /etc/hosts
> 127.0.0.1  localhost
> ::1        ip6-localhost ip6-loopback
> 
> root at yoga:~# cat /proc/sys/kernel/hostname
> yoga.lenovo
> 
> root at yoga:~# hostname
> yoga.lenovo
> 
> root at yoga:~# hostname -s
> yoga
> 
> root at yoga:~# hostname -f
> yoga.lenovo
> 
> root at yoga:~# hostname -d
> lenovo
> 
> root at yoga:~# getent hosts 127.0.0.1
> 127.0.0.1       localhost
> 
> root at yoga:~# getent hosts 127.0.1.1
> 192.168.1.111   yoga.lenovo
> 10.0.2.1        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
> 
Thanks Brandon and Tom for the input. I'm going to just leave it be for
now and not install libnss-myhostname.

Chris

-- 
Chris
KeyID 0xE372A7DA98E6705C
31.11°N 97.89°W (Elev. 1092 ft)
07:10:12 up 8:05, 1 user, load average: 0.48, 0.38, 0.27
Ubuntu 14.04.1 LTS, kernel 3.13.0-40-generic





More information about the ubuntu-users mailing list