Results 1 to 9 of 9

Thread: sudo: unable to resolve host

  1. #1
    Join Date
    Jun 2007
    Location
    The Netherlands
    Beans
    1,279
    Distro
    Ubuntu Development Release

    [SOLVED] sudo: unable to resolve host

    All of a sudden when I use the sudo command I get the following line:
    sudo: unable to resolve host whoop-desktop

    what does this mean and what can I do about it ?
    Last edited by whoop; May 19th, 2008 at 06:16 PM.

  2. #2
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: sudo: unable to resolve host

    Please read this sticky thread:

    http://ubuntuforums.org/showthread.php?t=773851

  3. #3
    Join Date
    Jun 2007
    Location
    The Netherlands
    Beans
    1,279
    Distro
    Ubuntu Development Release

    Re: sudo: unable to resolve host

    I fixed it myself. I remembered that I had been messing with my domain name in network settings

  4. #4
    Join Date
    Jun 2007
    Location
    The Netherlands
    Beans
    1,279
    Distro
    Ubuntu Development Release

    Re: sudo: unable to resolve host

    thanks, Monicker. Guess I was sleeping on the job

  5. #5
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,255
    Distro
    Xubuntu 17.10 Artful Aardvark

    Re: sudo: unable to resolve host

    Yup. If you change the hostname in /etc/hostname, you must also fix up /etc/hosts so the new name resolves to 127.0.0.1. The safest way is to edit hosts and add the new name, then edit hostname, then go back to hosts to remove the old hstname.

  6. #6
    Join Date
    Feb 2005
    Beans
    130

    Re: sudo: unable to resolve host

    The Cog, I think you meant 127.0.1.1
    There they go! I must hurry after them, for I am their leader.

  7. #7
    Join Date
    Dec 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: sudo: unable to resolve host

    Quote Originally Posted by The Cog View Post
    Yup. If you change the hostname in /etc/hostname, you must also fix up /etc/hosts so the new name resolves to 127.0.0.1. The safest way is to edit hosts and add the new name, then edit hostname, then go back to hosts to remove the old hstname.
    I think you misspoke there. The hostname has to resolve to an interface on the host (any). This allows you to communicate with the host using...the host name. My desktop host (malibu) resolves to 192.168.1.3.
    Code:
    /etc/hosts
    127.0.0.1	localhost
    192.168.1.3	malibu surfrider
    Last edited by capscrew; October 5th, 2011 at 12:00 AM.

  8. #8
    Join Date
    Dec 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: sudo: unable to resolve host

    Quote Originally Posted by linuxNewb View Post
    The Cog, I think you meant 127.0.1.1
    Using 127.0.1.1 is due to a Debian bug. The IP 127.0.0.1 and 127.0.1.1 both resolve to the loopback address.

  9. #9
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: sudo: unable to resolve host

    Back to sleep thread..
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •