Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: unable to resolve host

  1. #1
    Join Date
    Mar 2011
    Location
    South Dakota
    Beans
    1,132
    Distro
    Ubuntu 13.10 Saucy Salamander

    Arrow unable to resolve host

    I have two things going on with my computer where I'm getting (error?) messages.

    One is:

    "The password you use to log in to your computer no longer matches that of your log in keyring."

    This is in a window that pops up on my desktop after I log in and I have to enter my old password to get in the rest of the way.

    I found this: http://ubuntuforums.org/showthread.php?t=1036564 link and followed the path given in post #2. There, in the list, I find an entry named "uname@host" which shows my new/ changed host name. When I double click it and expand the "password" section at the bottom of the window I find that the password is indeed my new password, not the old one (you can tick box to "show password").

    The other is, and I think this is connected:

    When I use sudo in the terminal I get: "unable to resolve host"

    I went to:

    Code:
    cd /etc; less hosts
    and in the second line what I see is the old host name and not the new. I think that if I can correct this second thing, both will be resolved?? Or is that file even relevant to the situation??

    If that is true, I want to make sure I go about it in the right way and not end up locking myself out of my own computer or something stupid like that.

    Can anyone give me some direction on this?

    Thanks
    Last edited by ClientAlive; May 31st, 2011 at 05:59 PM.
    “ The best method for accelerating a computer is the one that boosts it by 9.8 m/s2. ”
    - Anonymous

  2. #2
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,369
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: unable to resolve host

    Restart the machine and get the grub menu showing, then boot into the "recovery" entry rather than your usual one. This will set you up as the root user, so be very careful. You can then use a text editor to change the host name in /etc/hosts but be sure to also change it at /etc/hostname as well. Save the changes and restart normally. That ought to be all that's necessary for correcting the host name and sudo, but I'm not certain about the keyring problem.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

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

    Re: unable to resolve host

    Did you change your user account password from the commandline or via GUI?

    As for the "unable to resolve host" thing, it happens when you change hostnames.

    Edit the /etc/hosts file and replace the old name with the new name.

    Note: sudo works fine, it just complains, so you can edit it with the machine running instead of having to boot into recovery mode.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

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

  4. #4
    Join Date
    Mar 2011
    Location
    South Dakota
    Beans
    1,132
    Distro
    Ubuntu 13.10 Saucy Salamander

    Arrow Re: unable to resolve host

    Quote Originally Posted by CharlesA View Post
    Did you change your user account password from the commandline or via GUI?

    As for the "unable to resolve host" thing, it happens when you change hostnames.

    Edit the /etc/hosts file and replace the old name with the new name.

    Note: sudo works fine, it just complains, so you can edit it with the machine running instead of having to boot into recovery mode.

    I changed the password via the gui (system > administration > users and groups > ). That's the only way I know how to do that. I'm having a hard time recalling which method I used to change the host name but I'm relatively certain I did that through the command line.

    Is there anything I can to to cover myself if some mistake were to be made and I got locked out of my computer or something? Is there some file or something I can save to my thumb drive or some way I could roll things back in case something goes wrong?

    Also I have never used recovery mode with Linux, nor have I ever read anything about how to do it or how it works. I'll google it right now though.

    Thanks
    -----------------------------------

    Edit: The keyring thing is kind of concerning to me also. I mean, I can imagine two ways that things could go wrong on me. One is that when I edit the hostname in those files things become separated between the hostname and the keyring. The other is that the keyring be separated from the right password - except that I checked out what the password is set to in the keyring and it is the new one. Not sure if I'm thinking about these things right or not though. Maybe it doesn't even work that way.

    It's just that these two things seem like they would be connected to one another - not separate. I gather that most things are connected to one another in some way. I think of the word - "systemic". Or, to use our solar system as an example - each part works together to form the whole. If one part gets thrown out of balance the rest of it messes up too. You know?
    Last edited by ClientAlive; June 1st, 2011 at 08:19 PM.
    “ The best method for accelerating a computer is the one that boosts it by 9.8 m/s2. ”
    - Anonymous

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

    Re: unable to resolve host

    If you changed the password via the GUI, it should have changed your keyring password too. Hmm.

    If you mess something up, you can always boot into recovery mode and reset your password or undo whatever change you made.

    You can access it by holding down shift until the GRUB menu appears, then select "recovery mode" from the list.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

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

  6. #6
    Join Date
    Mar 2011
    Location
    South Dakota
    Beans
    1,132
    Distro
    Ubuntu 13.10 Saucy Salamander

    Arrow Re: unable to resolve host

    By the way

    Code:
    /etc/hostname
    Only contains one item and that item is the new host name. And . . .

    Code:
    /etc/hosts
    Contains seven items (plus a description line that is commented out). Below is what mine looks like now - but I've changed the actual name to "oldhost" because that is what it is - the old host name. I mean I changed it here on the post not in the file itself. I have not changed anything in the file yet. I'm going to copy both of those files (as they are before any changes) to my thumb drive before I do anything. Maybe it will make a difference to have the original on there just in case. I suppose I should make a copy on the local system too and append something like ".original" to the copied file name.

    Code:
    127.0.0.1       localhost
    127.0.1.1       "oldhost"
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    Last edited by ClientAlive; June 1st, 2011 at 08:31 PM.
    “ The best method for accelerating a computer is the one that boosts it by 9.8 m/s2. ”
    - Anonymous

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

    Re: unable to resolve host

    Change "oldhost" to "newhost" and it should work fine.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

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

  8. #8
    Join Date
    Mar 2011
    Location
    South Dakota
    Beans
    1,132
    Distro
    Ubuntu 13.10 Saucy Salamander

    Arrow Re: unable to resolve host

    Quote Originally Posted by CharlesA View Post
    Change "oldhost" to "newhost" and it should work fine.

    Ok. Here we go. Wish me luck.

    I'm just not the same person I was before that one thing happened. You remember the one. That really changed me with regard to my relationship with Linux. What an eye opener!

    “ The best method for accelerating a computer is the one that boosts it by 9.8 m/s2. ”
    - Anonymous

  9. #9
    Join Date
    Mar 2011
    Location
    South Dakota
    Beans
    1,132
    Distro
    Ubuntu 13.10 Saucy Salamander

    Arrow Re: unable to resolve host

    Quote Originally Posted by ClientAlive View Post
    Ok. Here we go. Wish me luck.

    I'm just not the same person I was before that one thing happened. You remember the one. That really changed me with regard to my relationship with Linux. What an eye opener!


    Ok . . .

    Code:
    cd /etc; nano hosts
    Edited the second line to match the new host name; then, ctrl X to exit. Prompted to save the changes. Entered "y" (without quotes) and then press enter.

    Then:

    Code:
    sudo reboot
    Those solved the problem with the "unable to resolve host" thing when using sudo. I still have the keyring issue though. I think when I changed the password in the keyring I used the gui and first went into "users and groups" and then went to: "Applications > Passwords and Encryption Keys" double clicked the entry that showed "uname@host" clicked the plus at the bottom of the window to show the password then ticked the "Show password" box and replaced what was in the field with the new one then exited out.

    I wonder what I should look for to fix that? I think maybe I just didn't go about it the right way?
    “ The best method for accelerating a computer is the one that boosts it by 9.8 m/s2. ”
    - Anonymous

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

    Re: unable to resolve host

    Try changing the password from System > Preferences > About Me
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

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

Page 1 of 2 12 LastLast

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
  •