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

Re: armv7 vs buster sudo complains about hostname or something

On Fri 05 Jul 2019 at 06:15:02 (-0400), Gene Heskett wrote:
> On Thursday 04 July 2019 23:38:50 andreimpopescu@gmail.com wrote:
> > On Jo, 04 iul 19, 03:30:55, Gene Heskett wrote:
> > > On Thursday 04 July 2019 02:47:50 Andrei POPESCU wrote:
> > > > I seem to recall sudo cares about /etc/hosts.
> > >
> > > But I have that address TAB hostname.domain.name TAB alias in the
> > > hosts file. No errors there.
> >
> > How about showing us (attaching) the complete file ;)
> Attaching is difficult, I had to remount the machine. But here it is.

>	localhost
>	router.coyote.den	router
>    coyote.coyote.den	coyote
>	shop.coyote.den		shop
>	lathe.coyote.den	lathe
>	lappy.coyote.den	lappy
>	sheldon.coyote.den	sheldon
>	GO704.coyote.den	GO704
>	picnic.coyote.den	picnc
>	MFC.coyote.den		printer	scanner
>	vna.coyote.den		vna
> ::1		localhost ip6-localhost ip6-loopback
> ff02::1		ip6-allnodes
> ff02::2		ip6-allrouters
> #	raspberrypi

I'm reluctant to say much about your network configuration since you
wrote about having a managed switch as well as your router in your
"lashup", and also because I have no idea what you've "nuked".

My LAN is entirely static, with a master list of hosts,
/root/hosts-1-template, on my laptop, which I distribute to all the
others' /root directories and then mangle into place in /etc.
I don't try to fight dhcp in the router (which lacks a DNS server),
but just put all the hosts' MAC addresses into its Address Reservation
list (including things like printers, mobiles, Rokus and TVs).
Anything that appears as is a stranger.

I mangle the master list with two lines of bash (which sit in the
bash history file):

# cat /root/hosts-[0-9]-*[^~] | sed -e "/^[[:space:]]*192.168.1.[0-9]\+[[:spa
ce:]]\+\(.*\)\$/\t\2\t# \1/" | diff -U1 -bw - /etc/hosts | less

which checks any editing done on the master copies
/root/hosts-[0-9]-*[^~], and the same line, but ending with:

ce:]]\+\(.*\)\$/\t\2\t# \1/" > /etc/hosts

to overwrite the real hosts file after checking. So:       localhost     router.corp     router    acer.corp       acer
gets turned into:       localhost     router.corp     router       acer.corp       acer    #
by sed when that line is run on the acer PC.

(I've split the line in the middle of "space", obviously, for posting
here. I don't have multiple aliases for interfaces like your
printer/scanner, nor hostnames that duplicate domain names like your
coyote, keeping things simpler. I do have a /root/hosts-2-antihosts
file, though, which is why there's that -[0-9]- wildcard.)


Reply to: