• sudo -i warning.

    From Bob Latham@3:770/3 to All on Tuesday, September 26, 2023 10:15:54
    When I type sudo -i on my Rpi it works but I get the following
    warning..

    "sudo: Unable to resolve host intranet-pihole2: Name or service not
    known."

    Anyone give a clue why I get that?

    Yes this is a spare machine used as a backup for my pihole and
    intranet pi.

    Thanks.

    Bob.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Elvidge@3:770/3 to Bob Latham on Tuesday, September 26, 2023 11:26:49
    On 26/09/2023 10:15, Bob Latham wrote:
    When I type sudo -i on my Rpi it works but I get the following
    warning..

    "sudo: Unable to resolve host intranet-pihole2: Name or service not
    known."

    Anyone give a clue why I get that?

    Yes this is a spare machine used as a backup for my pihole and
    intranet pi.

    Thanks.

    Bob.


    Look in /etc/hosts and /etc/hostname
    Does that name exist?


    --
    Chris Elvidge, England
    I WILL NEVER WIN AN EMMY

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Bob Latham@3:770/3 to Chris Elvidge on Tuesday, September 26, 2023 13:37:35
    In article <ueubl9$2f4rp$1@dont-email.me>,
    Chris Elvidge <chris@mshome.net> wrote:
    On 26/09/2023 10:15, Bob Latham wrote:
    When I type sudo -i on my Rpi it works but I get the following
    warning..

    "sudo: Unable to resolve host intranet-pihole2: Name or service not
    known."

    Anyone give a clue why I get that?

    Yes this is a spare machine used as a backup for my pihole and
    intranet pi.

    Thanks.

    Bob.


    Look in /etc/hosts and /etc/hostname
    Does that name exist?

    Thanks.

    Yes. It exists in /etc/hostname but not in /etc/hosts.

    It is the network name of the machine it is running on.

    I presume nasty things will happen if I delete it?

    Bob.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Bob Latham on Tuesday, September 26, 2023 14:39:09
    On 26/09/2023 13:37, Bob Latham wrote:
    In article <ueubl9$2f4rp$1@dont-email.me>,
    Chris Elvidge <chris@mshome.net> wrote:
    On 26/09/2023 10:15, Bob Latham wrote:
    When I type sudo -i on my Rpi it works but I get the following
    warning..

    "sudo: Unable to resolve host intranet-pihole2: Name or service not
    known."

    Anyone give a clue why I get that?

    Yes this is a spare machine used as a backup for my pihole and
    intranet pi.

    Thanks.

    Bob.


    Look in /etc/hosts and /etc/hostname
    Does that name exist?

    Thanks.

    Yes. It exists in /etc/hostname but not in /etc/hosts.

    It is the network name of the machine it is running on.

    I presume nasty things will happen if I delete it?

    Bob.

    I think they already have

    My /etc/host looks like this

    $ more /etc/hosts
    127.0.0.1 localhost
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    127.0.1.1 heating-controller

    You need to make yours look similar but with 'heating-controller'
    replaced with 'intranet-pihole'.

    --
    Any fool can believe in principles - and most of them do!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Bob Latham@3:770/3 to The Natural Philosopher on Tuesday, September 26, 2023 15:38:57
    In article <ueumtt$2h6ld$2@dont-email.me>,
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 26/09/2023 13:37, Bob Latham wrote:
    In article <ueubl9$2f4rp$1@dont-email.me>,
    Chris Elvidge <chris@mshome.net> wrote:
    On 26/09/2023 10:15, Bob Latham wrote:
    When I type sudo -i on my Rpi it works but I get the following
    warning..

    "sudo: Unable to resolve host intranet-pihole2: Name or service not
    known."

    Anyone give a clue why I get that?

    Yes this is a spare machine used as a backup for my pihole and
    intranet pi.

    Thanks.

    Bob.


    Look in /etc/hosts and /etc/hostname
    Does that name exist?

    Thanks.

    Yes. It exists in /etc/hostname but not in /etc/hosts.

    It is the network name of the machine it is running on.

    I presume nasty things will happen if I delete it?

    Bob.

    I think they already have

    My /etc/host looks like this

    $ more /etc/hosts
    127.0.0.1 localhost
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    127.0.1.1 heating-controller

    You need to make yours look similar but with 'heating-controller'
    replaced with 'intranet-pihole'.

    Oh right, that's interesting. The /etc/host file had much the same as
    yours except the network name was original and so when I changed the
    name using raspi-config last week, it failed to change the name there
    but it did change on the network.

    Anyway just put it right and it has fixed the issue.

    Thanks TNP & Chris.


    Cheers,

    Bob.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From NY@3:770/3 to Bob Latham on Friday, September 29, 2023 21:07:50
    On 26/09/2023 15:38, Bob Latham wrote:
    In article <ueumtt$2h6ld$2@dont-email.me>,
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 26/09/2023 13:37, Bob Latham wrote:
    In article <ueubl9$2f4rp$1@dont-email.me>,
    Chris Elvidge <chris@mshome.net> wrote:
    On 26/09/2023 10:15, Bob Latham wrote:
    When I type sudo -i on my Rpi it works but I get the following
    warning..

    "sudo: Unable to resolve host intranet-pihole2: Name or service not
    known."

    Anyone give a clue why I get that?

    Yes this is a spare machine used as a backup for my pihole and
    intranet pi.

    Thanks.

    Bob.


    Look in /etc/hosts and /etc/hostname
    Does that name exist?

    Thanks.

    Yes. It exists in /etc/hostname but not in /etc/hosts.

    It is the network name of the machine it is running on.

    I presume nasty things will happen if I delete it?

    Bob.

    I think they already have

    My /etc/host looks like this

    $ more /etc/hosts
    127.0.0.1 localhost
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    127.0.1.1 heating-controller

    You need to make yours look similar but with 'heating-controller'
    replaced with 'intranet-pihole'.

    Oh right, that's interesting. The /etc/host file had much the same as
    yours except the network name was original and so when I changed the
    name using raspi-config last week, it failed to change the name there
    but it did change on the network.

    Anyway just put it right and it has fixed the issue.


    Is it necessary to have entries in /etc/hosts for any computers that the
    Pi needs to talk to? On a bog-standard home network (TPlink router with
    DHCP enabled) a Pi can ping other Linux or Windows PCs by their
    hostname: the router handles the name-to-IP resolution. That doesn't
    work for Windows PCs - a Pi can ping a Windows computer, but a Windows
    PC cannot *reliably* ping a Pi by hostname. But that is solved by using appending ".local" to the Pi's hostname when accessing from Windows.

    When I refer to pinging, I include all other things like Windows
    accessing a SAMBA shared drive on the Pi (*), or a browser on Windows
    accessing an HTTP server on the Pi. So I changed "http://pi:1234" to "http://pi.local:1234" in any browser bookmarks and it worked fine.
    Easier than having to use IP addresses in URLs.


    (*) OK, that uses NetBIOS so the name query mechanism is different to a
    simple ping or a URL reference.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)