Results 1 to 10 of 10

Thread: Problem : "sudo: unable to resolve host ubuntu-server"

  1. #1
    Join Date
    Oct 2013
    Beans
    6

    Question Problem : "sudo: unable to resolve host ubuntu-server"

    Hello everybody,

    I got a problem with Sudo
    everytime I use Sudo I got the following problem : "sudo: unable to resolve host ubuntu-server"

    the /etc/hosts file looks like this:
    Code:
    127.0.0.1       localhost
    127.0.1.1       ubuntu-server
    
    # The following lines are desirable for IPv6 capable hosts
    
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    FF02::2 ip6-allrouters
    What can I do to resolve this problem ?


    i hope someone can help

    grtz Manfred

  2. #2
    Join Date
    Jun 2007
    Location
    K-o-T,
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    From a terminal,what does
    Code:
    hostname
    produce?
    Hypertension = Take with a pinch of salt
    | Psychocats | Ubuntu Documentation | Howto [Solved] | BBcode list | Brother Website |

  3. #3
    Join Date
    Oct 2013
    Beans
    6

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    This produce :
    Code:
    ubuntu-server

  4. #4
    Join Date
    Oct 2013
    Beans
    6

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    hmm nobody who can help me ?

  5. #5
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    One of my servers had a similar /etc/hosts file. I don't remember the reason, but I commented out the 127.0.1.1 line and replaced it with the static IP address.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  6. #6
    Join Date
    Apr 2012
    Beans
    5,714

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    Hmm... can you post these as well please?

    Code:
    ls -l /etc/nsswitch.conf
    Code:
    cat /etc/nsswitch.conf
    Are you using any directory services like LDAP?

  7. #7
    Join Date
    Oct 2013
    Beans
    6

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    Quote Originally Posted by steeldriver View Post
    Hmm... can you post these as well please?

    Code:
    ls -l /etc/nsswitch.conf
    Code:
    -rw-r--r-- 1 root root 460 Oct  6 19:22 /etc/nsswitch.conf
    Code:
    cat /etc/nsswitch.conf
    Code:
    # /etc/nsswitch.conf
    #
    # Example configuration of GNU Name Service Switch functionality.
    # If you have the `glibc-doc-reference' and `info' packages installed, try:
    # `info libc "Name Service Switch"' for information about this file.
    passwd:         compat
    group:          compat
    shadow:         compat
    hosts:  dns
    networks:       files
    protocols:      db files
    services:       db files
    ethers:         db files
    rpc:            db files
    netgroup:       nis
    Are you using any directory services like LDAP?
    I think, no

  8. #8
    Join Date
    Apr 2012
    Beans
    5,714

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    Well your /etc/nsswitch definitely looks non-standard, in particular

    Code:
    hosts:  dns
    tells the system to *only* use DNS, whereas the (default, afaik) config is to try files (i.e. /etc/hosts) first e.g. my 12.04 server has

    Code:
    hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
    I don't know enough about nsswitch to know why yours is different and I can't find what package supplies /etc/nsswitch.conf - what changes have you made / packages installed recently?

    If this is just a personal PC (not a real server) then I'd probably suggest backing up the existing nsswitch.conf file and editing the hosts entry - you'll have to do this from recovery mode if you can't sudo.

    EDIT: unless maybe it's a new 'feature' of dnsmasq that I don't know about?
    Last edited by steeldriver; October 12th, 2013 at 04:16 PM.

  9. #9
    Join Date
    Oct 2013
    Beans
    6

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    Thnks for the answer, it solves my problem.


    i have replaced :
    Code:
    Hosts:     dns
    with :

    Code:
    hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
    after replacing my problem was solved
    Last edited by manfred2; October 12th, 2013 at 04:52 PM.

  10. #10
    Join Date
    Jun 2013
    Location
    Somewhere on Earth.
    Beans
    512
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Problem : "sudo: unable to resolve host ubuntu-server"

    Please mark this thread as solved by going to thread tools.
    Avatar credit: http://www.omgubuntu.co.uk/2010/07/d...-spread-ubuntu
    Status: Hit with the Dengue virus
    Happy new year to all!

Tags for this Thread

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
  •