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

Thread: sudo unable to resolve host

  1. #11
    Join Date
    Jan 2008
    Location
    Spain
    Beans
    1,185
    Distro
    Ubuntu

    Re: sudo unable to resolve host

    Quote Originally Posted by Inetrix View Post
    I have both the actual file and the archive it was extracted from on my desktop.

    output is:
    patrick@patrix computer:~$ sudo cp -r $HOME/Desktop/SlicknesS-black /usr/share/themes
    sudo: unable to resolve host patrix computer

    it then prompts me for a password BUT for some reason I am unable to type in the console after the initial command was entered.
    First: there could be a problem with the name of your computer: it's a bad idea to choose one with spaces inside. I guess from your later post that you fixed it already (?)

    Second: The recursive -R has to be capital, as mcduck said

    Third: You're only trying to copy files. Why don't open nautilus with root privileges and copy comfortably using the gui? (from terminal "gksudo nautilus")

    Don't dispair, you're only facing tiny newcomer problems. You'll get used soon to the way basic things should be done, and you'll feel comfortable.
    Greetings
    Last edited by JC Cheloven; September 22nd, 2009 at 01:42 PM.
    What's even more important than free software? - OPEN FORMATS.

  2. #12
    Join Date
    Feb 2008
    Location
    Memphis, TN
    Beans
    613
    Distro
    Ubuntu

    Re: sudo unable to resolve host

    Actually, I looked at the cp man page, and it chows that either -R or -r can be used.

    OK, Inetrix, here's what I've learned from a little Googleing. Sudo uses the 127.0.1.1 line in you /etc/hosts file, and if it's wrong you can't use sudo. Unfortunately, you have to use sudo to edit /etc/hosts. So, you must boot into recovery mode, then run sudo nano /etc/hostname. Change the file to look like this:
    patrix-computer
    Then run sudo nano /etc/hosts and edit it to look like this:
    127.0.0.1 localhost
    127.0.1.1 patrix-computer
    ::1 localhostip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::1 ip6-allrouters
    ff02::3 ip6-allhosts
    Than boot back into normal mode. sudo should now work fine.

    I should to try and install Ubuntu with a space in the hostname and see if it breaks sudo. If so, that's probably a bug in the installer.
    Last edited by mac9416; September 22nd, 2009 at 02:52 PM.
    Myth: Linux is only usable with a persistent Internet connection. WRONG!
    You can use Keryx to download your .debs with dependencies from any OS!

  3. #13
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: sudo unable to resolve host

    mac9416: second command should be:

    Code:
    sudo nano /etc/hosts
    Thanks for telling me about this anyway, now I know what to do if anyone asks me how to change their hostname without breaking sudo!
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  4. #14
    Join Date
    Feb 2008
    Location
    Memphis, TN
    Beans
    613
    Distro
    Ubuntu

    Re: sudo unable to resolve host

    Thanks for pointing that out, 3rdalum. Still kinda early where I am.
    Myth: Linux is only usable with a persistent Internet connection. WRONG!
    You can use Keryx to download your .debs with dependencies from any OS!

Page 2 of 2 FirstFirst 12

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
  •