From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 482921382C5 for ; Wed, 10 Mar 2021 17:44:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CCCB7E08A2; Wed, 10 Mar 2021 17:43:56 +0000 (UTC) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8D0F6E0895 for ; Wed, 10 Mar 2021 17:43:56 +0000 (UTC) Received: by mail-qt1-x82c.google.com with SMTP id d11so13619751qtx.9 for ; Wed, 10 Mar 2021 09:43:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=BkrG1S7CNFZq3PrBmZwzejGckqpgj2rYe0N8IWdWRyI=; b=pPAAoFogPRmDfL3PkA/uxY/ENxJKShicQTWUileqx8XuyAHpd0dBrvnmk8hxUC7Z9M 5muSSi0EKG+Bm0alxtC3vgqRi76RvdbvhmYuVwUDGWrr/T/cNHiNEok8L9MWdHXW6KE+ Nz06Uyszc3jDXs/rvMTAjrjXlGIY6zunOog4mc/4+wMjV5cWVRYso6k15JS1eoB57PKi /Mh1Itxri/bQcPvnR65UZ7xilm4kynJpXnqho6KucM4h7tRXCnX7BX/7gSGZqZTXlQwD lvu0qWaaFbMAdJEla35iSbTFa1ugSq6wJCbn/6P/blAw1ZVcCVIcZVVXMuxssz/0y8kW QKKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=BkrG1S7CNFZq3PrBmZwzejGckqpgj2rYe0N8IWdWRyI=; b=oqZdekP4LDo/FgkkZ5BMwF5hExotgfCHMH/LAn4YYZZXdG98zpfNapV9RIIowrmEoA GXzjLWXNYKj/6m+UecXkDEvHrnAEL7LxOuVSd2GOswVrraj8ML2TZsLYDrmbzToYCnDv 4CZjcHzeVsNpR/+l3zzTI7lqWo+HRNKs5+BOlmp9GCD+VV13FWXQVIPxXTP/E9pl+F76 vA33WIEOzplrTSLSxy2d4teqi1LdjHJo9jLsLh2zrhGsfqzgkb2rj8p5ybVyVVq8QQZj 3Bw7ci1yrt5UAMUclrBNCkY28E2eWnRIZ7XQciKGUFViUeWRqYYjbRTbdFGgcNVz21FH nIDQ== X-Gm-Message-State: AOAM530u5tyDzdLhUrKCdi1WgYF3mkPOIdU+YeVn/nVBzR20MZFk2gqP V7FlOJ6npFixrz2uGCPyzq2vTE38xJdLGYALr7hgB7ag9Gg= X-Google-Smtp-Source: ABdhPJyC9rsdp0i15ULZvlx11a+fIKDjP96n2kaebX4rQ5a7f88RQ5wxWjIsaqGGJEJx5kXwGxfmFF35YW4TUFSJzMM= X-Received: by 2002:ac8:5156:: with SMTP id h22mr3766695qtn.260.1615398235362; Wed, 10 Mar 2021 09:43:55 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <65049b74-842b-0211-bbfe-35607c279a75@spamtrap.tnetconsulting.net> <3670ec37-c1ba-2351-9999-11f7ef1917dc@spamtrap.tnetconsulting.net> In-Reply-To: From: Mark Knecht Date: Wed, 10 Mar 2021 10:43:44 -0700 Message-ID: Subject: Re: [gentoo-user] Why do we add the local host name to the 127.0.0.1 / ::1 entry in the /etc/hosts file? To: Gentoo User Content-Type: multipart/alternative; boundary="000000000000fd5a0405bd323531" X-Archives-Salt: 64f7822b-462d-4c3a-928d-e52f0e383362 X-Archives-Hash: d2098daefd503dbd563ca33ea209ea13 --000000000000fd5a0405bd323531 Content-Type: text/plain; charset="UTF-8" On Wed, Mar 10, 2021 at 9:44 AM Grant Taylor < gtaylor@gentoo.tnetconsulting.net> wrote: > > On 3/10/21 6:27 AM, Mark Knecht wrote: > > Caveat - not an expert, just my meager understanding: > > > > 1) The name 'localhost' is historically for developers who want to > > access their own machine _without_ using DNS. > > Eh.... > > Using the /name/ "localhost" still uses name resolution. It could use > DNS or it may not. It /typically/ means the /etc/hosts file. But it > could mean DNS or NIS(+) or LDAP or something more esoteric. > OK, agreed, completely. localhost must be turned into an IP address. I guess what I was thinking was DNS means Server. If it's a Service then that's different. I think we're in agreement that if it can find the name in /etc/hosts, either actively or cached somewhere in memory, then it doesn't have to send anything over a cable to get the answer. And cable is too generic as I understand that DNS might be on this machine. Point taken. > IMHO what's special about the "localhost" name in particular is that > it's an agnostic / anycast method to say the local host that a given > program is running on without regard to what the actual host name is. > Agreed but I suspect if I don't have it in /etc/hosts then I'm unlikely to get results that make sense in real time, but that's case buy case. Again, completely agreed. > > 2) By general practice sometime in the deep, dark times 127.0.0.1 was > > accepted for this purpose. There's nothing special about the address. > > Deep, dark times? It's still used every single day across multiple > platforms, Linux, Unix, Windows, z/OS, i/OS, you name it. > I'm approaching my 66th birthday. Deep dark times for me are almost certainly more recent dates than for you. ;-) > > 3) I read the original quoted comment in the Kerberos Guide as a warning > > - 'to make matters worse, __SOME__" > > What did the warning mean to you? Because I took it as "be careful, > your $OS /may/ do this incorrectly". Where "this" is putting the FQDN > on the same line as 127.0.0.1 and / or ::1. > I took it as simply a Kerberos setup/config warning. Whoever wrote that had an opinion, experience or both and wanted you to know that. I didn't read anything more into it. The author cannot change what "some distros" do but wants to give you a fighting chance to get Kerberos working in case you're using one. Makes no sense to mention a specific distro because the list probably changes over time. Basically "You'd be wise to look at your /etc/hosts file and fix this silly configuration error that some distros do before trying to setup Kerberos" > I'm grateful for corroboration, but unfortunately that doesn't speak to > why the Gentoo handbook suggests what it does. I'm not a sys admin nor a Gentoo developer or documenter so I cannot comment on the manual specifically. As I no longer run Gentoo - I haven't for about 3 years other than one remaining VM seldom used and seldom updated - I'm way out of touch with the actual manual but interested in the subject. Over and out. - Mark --000000000000fd5a0405bd323531 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Mar 10, 2021 at 9:44 AM Grant Taylor <<= a href=3D"mailto:gtaylor@gentoo.tnetconsulting.net">gtaylor@gentoo.tnetcons= ulting.net> wrote:
>
> On 3/10/21 6:27 AM, Mark Knecht w= rote:
> > Caveat - not an expert, just my meager understanding:> >
> > 1) The name 'localhost' is historically for= developers who want to
> > access their own machine _without_ usi= ng DNS.
>
> Eh....
>
> Using the /name/ "local= host" still uses name resolution.=C2=A0 It could use
> DNS or it= may not.=C2=A0 It /typically/ means the /etc/hosts file.=C2=A0 But it
&= gt; could mean DNS or NIS(+) or LDAP or something more esoteric.
>
OK, agreed, completely. localhost must be turned into an I= P address.

I guess what I was thinking was DNS mea= ns Server. If it's a Service
then that's different. I thi= nk we're in agreement that if it can find the
name in /etc/ho= sts, either actively or cached somewhere in memory,
then it doesn= 't have to send anything over a cable to get the answer.

=
And cable is too generic as I understand that DNS might be on th= is=C2=A0
machine.

Point taken.

> IMHO what's special about the "localhost" name in p= articular is that
> it's an agnostic / anycast method to say the = local host that a given
> program is running on without regard to wha= t the actual host name is.
>

Agreed but I su= spect if I don't have it in /etc/hosts then I'm unlikely=C2=A0
to get results that make sense in real time, but that's case buy = case.

Again, completely agreed.

>= > 2) By general practice sometime in the deep, dark times 127.0.0.1 was=
> > accepted for this purpose. There's nothing special about = the address.
>
> Deep, dark times?=C2=A0 It's still used ev= ery single day across multiple
> platforms, Linux, Unix, Windows, z/O= S, i/OS, you name it.
>

<LOL> I'm = approaching my 66th birthday. Deep dark times for me are
almost c= ertainly more recent dates than for you. ;-)=C2=A0

> > = 3) I read the original quoted comment in the Kerberos Guide as a warning> > - 'to make matters worse, __SOME__"
>
> Wha= t did the warning mean to you?=C2=A0 Because I took it as "be careful,=
> your $OS /may/ do this incorrectly".=C2=A0 Where "this&q= uot; is putting the FQDN
> on the same line as 127.0.0.1 and / or ::1= .
>

I took it as simply a Kerberos setup/con= fig warning. Whoever wrote that
had an opinion, experience or bot= h and wanted you to know that. I=C2=A0
didn't read anything m= ore into it. The author cannot change what=C2=A0
"some distr= os" do but wants to give you a fighting chance to get
Kerber= os working in case you're using one. Makes no sense to mention=C2=A0
a specific distro because the list probably changes over time.

Basically "You'd be wise to look at your /etc= /hosts file and fix this
silly configuration error that some dist= ros do before trying to=C2=A0
setup Kerberos"=C2=A0

<SNIP>

> I'm grateful for corroboration, b= ut unfortunately that doesn't speak to
> why the Gentoo handbook = suggests what it does.

I'm not a sys admin= nor a Gentoo developer or documenter so I cannot=C2=A0
comment o= n the manual specifically.=C2=A0

As I no longer ru= n Gentoo - I haven't for about 3 years other than one
remaini= ng VM seldom used and seldom updated - I'm way out of=C2=A0
t= ouch with the actual manual but interested in the subject.=C2=A0
=
Over and out.

- Mark

=
--000000000000fd5a0405bd323531--