From owner-freebsd-questions@freebsd.org Mon Aug 13 14:44:39 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1709E1074A74 for ; Mon, 13 Aug 2018 14:44:39 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from kicp.uchicago.edu (kicp.uchicago.edu [128.135.20.70]) by mx1.freebsd.org (Postfix) with ESMTP id A63C97CD79 for ; Mon, 13 Aug 2018 14:44:38 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from point.uchicago.edu (point.uchicago.edu [128.135.52.6]) by kicp.uchicago.edu (Postfix) with ESMTP id 3F9FC718087 for ; Mon, 13 Aug 2018 09:44:32 -0500 (CDT) Subject: Re: name resolution puzzle To: freebsd-questions@freebsd.org References: <5cbb1cc0-8e3f-2736-755e-d182abfd90e6@kicp.uchicago.edu> <403d5d4b-a342-947b-069d-149f1f8232e9@FreeBSD.org> From: Valeri Galtsev Message-ID: Date: Mon, 13 Aug 2018 09:44:32 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <403d5d4b-a342-947b-069d-149f1f8232e9@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2018 14:44:39 -0000 On 08/04/18 01:02, Matthew Seaman wrote: > On 03/08/2018 22:41, Valeri Galtsev wrote: >> So, it appears, that the commands "host" and "nslookup" go directly to >> DNS server, and do not look into /etc/hosts first which I have expected. > > > host(1), dig(1), delv(1), drill(1) and nslookup(1) are all specifically > tools for doing lookups in the DNS. That's the only place they look. > > If you want to replicate the full hostname resolution process using all > the facilities enabled in your nsswitch.conf, use getent(1) like so: > > getent hosts freefall.freebsd.org Thank you, Matthew! I learned something that solves everything for me! Valeri > > Cheers, > > Matthew > -- ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++