Re: Cannot no longer resolve local hostname with the new nsswitch.conf

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



On Tue, Nov 8, 2016 at 1:37 PM Chi-Hsuan Yen via arch-general <
arch-general@xxxxxxxxxxxxx> wrote:

> Hi Arch enthuasiasts,
>
> With testing/filesystem 2016.11-2, I can no longer use my local hostname to
> acess services on the local machine. For example:
>
> $ hostname
> PC12574
>
> $ ping PC12574
> ping: PC12574: Name or service not known
>
> Seems changes in nsswitch.conf [1] does the effect. If I change the hosts:
> line in nsswitch.conf back to the old configuration "files resolve
> mymachines myhostname", or remove the [!UNAVAIL=return] part from this
> line, ping works fine:
>
> $ ping PC12574
> PING PC12574(PC12574 (fe80::ae22:bff:fe77:e20b%enp3s0)) 56 data bytes
> 64 bytes from PC12574 (fe80::ae22:bff:fe77:e20b%enp3s0): icmp_seq=1 ttl=64
> time=0.025 ms
> 64 bytes from PC12574 (fe80::ae22:bff:fe77:e20b%enp3s0): icmp_seq=2 ttl=64
> time=0.078 ms
>
> Is it a bug? Or such a usage is just a non-standard coincidence?
>
> Thanks for any help.
>
> Yen Chi Hsuan
>
> [1]
>
> https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/filesystem&id=f1cd9f7fb4cdf7617a1b875e14be212733f9c67a


This is an effect of putting "myhostname" at the end of the list. If you
don't want your network to be able to override lookup for your hostname
move "myhostname" to after "files".

It seems this only happens when you're part of a domain. AFAICT resolve/dns
won't ask upstream for unqualified names.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux