Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

  1. #11
    Join Date
    Aug 2008
    Beans
    54

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    I Thought I would post /etc/network/interfaces:
    Code:
    auto br0
    iface br0 inet dhcp
    bridge_ports eth0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off
    
    auto lo
    iface lo inet loopback
    
    
    
    iface eth4 inet ipv4ll
    
    auto eth4
    
    
    iface eth0 inet ipv4ll
    
    auto eth0
    Does this look like it would cause any problems?

    My network is unavailable sometimes at startup, I am using the "Local Zeroconf Network (IPV4LL)" setting...it seems to work the best.

    Code:
    myron@ubuntu:~$ sudo gedit /etc/network/interfaces
    sudo: unable to resolve host ubuntu
    [sudo] password for myron: 
    Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]
    Also, I'm getting the usage message alot. It usually pops in after I close a program that's running with a terminal in the background. Any thoughts on that?
    Last edited by Dejavou42; September 5th, 2008 at 11:28 PM.

  2. #12
    Join Date
    Sep 2007
    Beans
    50

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    Fixed my issue. Editing my /etc/hosts as described worked for me.

    I changed first line in my /etc/hosts from:
    127.0.0.1 localhost

    to:
    127.0.0.1 localhost localhost.local myhost
    127.0.0.1 myhost

    BTW, myhost is the same as listed in /etc/hostname

    didnt have to reboot just worked.

    hope this helps, george

  3. #13
    Join Date
    Aug 2008
    Beans
    54

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    Just to let everyone know, I tried the above mentioned solution again. Below is my current /etc/hosts, /etc/hostname, /etc/sudoers, /etc/network/interfaces, and the persisting sudo error.

    /etc/hosts:
    Code:
    127.0.0.1 localhost localhost.local ubuntu
    127.0.1.1 ubuntu
    
    
    # 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
    ff02::3 ip6-allhosts
    /etc/hostname:
    Code:
    ubuntu
    /etc/sudoers:
    Code:
    # /etc/sudoers
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # See the man page for details on how to write a sudoers file.
    #
    
    Defaults	env_reset
    
    # Uncomment to allow members of group sudo to not need a password
    # %sudo ALL=NOPASSWD: ALL
    
    # Host alias specification
    
    # User alias specification
    
    # Cmnd alias specification
    
    # User privilege specification
    root	ALL=(ALL) ALL
    
    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL
    /etc/network/interfaces:
    Code:
    auto br0
    iface br0 inet dhcp
    bridge_ports eth0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off
    
    auto lo
    iface lo inet loopback
    
    
    
    iface eth4 inet ipv4ll
    
    auto eth4
    
    
    iface eth0 inet ipv4ll
    
    auto eth0
    Persisting Sudo error:
    Code:
    myron@ubuntu:~$ sudo gedit /etc/hosts
    sudo: unable to resolve host ubuntu
    [sudo] password for myron: 
    Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]myron@ubuntu:~$ sudo gedit /etc/hostname
    sudo: unable to resolve host ubuntu
    Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]myron@ubuntu:~$ sudo gedit /etc/sudoers
    sudo: unable to resolve host ubuntu
    Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]myron@ubuntu:~$ sudo gedit /etc/network/interfaces
    sudo: unable to resolve host ubuntu
    Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]myron@ubuntu:~$
    Difference in error message when running a command that does not start another program:

    Code:
    myron@ubuntu:~$ sudo uname
    sudo: unable to resolve host ubuntu
    Linux
    myron@ubuntu:~$
    Here is the current state of all of the files that have been requested in the duration of this post. This is not the normal Sudo hostname / hosts difference problem from what I have seen and read so far. Any help is appreciated on this issue.

  4. #14
    Join Date
    Jul 2008
    Location
    CA
    Beans
    29
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    Sorry, I don't have an answer: but, I would like to correct a previous comment I made, after reading a comment in a bug related to this issue (apparently fixed, tho). I'm not sure if what I had was entirely incorrect, but nonetheless, the comment on the aforementioned post suggests that 127.0.0.1 should never be mapped to a hostname; rather, use 127.0.1.1 for this (and this should map to /etc/hostname).

    But it doesn't sound like that's the problem described in this thread; I'm just correcting myself.

    Another possible thing to look at is how, exactly, hostnames are being resolved. (Otherwise, I'm out of ideas):

    Code:
    $ cat /etc/nsswitch.conf 
    # /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:          files mdns4_minimal [NOTFOUND=return] dns mdns4
    networks:       files
    
    protocols:      db files
    services:       db files
    ethers:         db files
    rpc:            db files
    
    netgroup:       nis

    Good luck,
    -m

    references:

  5. #15
    Join Date
    Aug 2008
    Beans
    54

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    Do programmers for the Ubuntu OS actually look at these forums, or would I be better to post a bug report to get help from one of them?

    Thanks everyone.

  6. #16
    Join Date
    Sep 2008
    Beans
    1

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    I'm also having the same problem, and editing the hosts and hostname files as mentioned above didn't help at all. Sudo works, but still complains everytime I try to use it.

  7. #17
    Join Date
    Aug 2008
    Beans
    54

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    I didn't have this problem when I first installed ubuntu, When I installed Ubuntu on this hard drive it was in another computer. I really noticed the problem when I added a Virtual Machine to the computer. Also, I remember that the internet was registering as being slower with some internet tests so I tried some things to disable IPV6. I would expect neither of the two things to cause a problem. I am also having a simultaneous problem with hcd_ehci, (driver for usb 2.0), I had to disable it. I'm not worried about these other things, I'm just listing them to narrow down some common variables.

  8. #18
    Join Date
    Aug 2008
    Beans
    54

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    It's been a while since I have updated this post, but I have finally found some new information. I have a domain name that points to my ip address. When I change my hostname to "mydomain.net", the sudo: unable to resolve host: (hostname) error goes away. So, I started look through the apps that I have installed to see if one of them was causing this. I had installed apache2 to this computer at one time to play with the configuration, but this computer is not a webserver. I found that apache2-utils includes a program called logresolve which "resolves ip addresses to host name in log files."
    I had hoped that this program was causing my issue since the description sounds like it would cause my problem. Uninstalling apache2-utils did not help. I am going to continue to look through my installed applications. In the mean time, does anyone know of another package that could cause this issue?

    Thanks.

  9. #19
    Join Date
    Aug 2008
    Beans
    54

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    Setting my hostname to my domain name works, but I noticed that if the internet connection goes down, sudo will not work, and an error message pops up for gnome saying that it can not start the gnome settings daemon.

  10. #20
    Join Date
    Jan 2009
    Beans
    33

    Re: sudo unable to resolve host new problem (not /etc/hosts /etc/hostname difference)

    just for the record I have to say that changing
    127.0.0.1 myhostname
    127.0.1.1 myhostname.WORKGROUP
    in /etc/hosts to
    127.0.0.1 localhost myhostname
    127.0.1.1 myhostname myhostname.WORKGROUP
    solved the problem.



    being myhostname the result of
    cat /etc/hostname
    and WORKGROUP
    the work group for samba config file.

    Maybe samba or other network sharing system may cause this problems with names resolution. I had an issue, time ago, with apache and samba too.
    Last edited by pikamoku; July 18th, 2009 at 08:12 AM. Reason: spelling

Page 2 of 2 FirstFirst 12

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
  •