Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Absolute Beginner Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Absolute Beginner Talk
The perfect starting place to find out more about computers, Linux and Ubuntu.

 
Thread Tools Display Modes
Old March 13th, 2008   #1
Darkade
Way Too Much Ubuntu
 
Darkade's Avatar
 
Join Date: Nov 2007
Location: Puebla, México
Beans: 327
Ubuntu 8.04 Hardy Heron
[SOLVED] sudo unable to resolve host

Every time I use sudo the terminal says

sudo: unable to resolve host icarus-laptop

It works but that didn't happened before, ideas? Thanks
Darkade is offline   Reply With Quote
Old March 13th, 2008   #2
PmDematagoda
The Free Multi-Distro Tux
 
PmDematagoda's Avatar
 
Join Date: Aug 2007
Location: Kottawa, Sri Lanka
Beans: 7,248
Ubuntu 8.04 Hardy Heron
Send a message via MSN to PmDematagoda Send a message via Skype™ to PmDematagoda
Re: sudo unable to resolve host

Post the output of:-
Code:
cat /etc/hosts
__________________
Think carefully before executing commands containing "rm", especially "sudo rm -rf ", if you require more information concerning this matter, read this.
I am an experimenter, give me the most stable OS and I can make it unstable in a few hours.

C == seriously fast == FTW!
PmDematagoda is offline   Reply With Quote
Old March 13th, 2008   #3
Darkade
Way Too Much Ubuntu
 
Darkade's Avatar
 
Join Date: Nov 2007
Location: Puebla, México
Beans: 327
Ubuntu 8.04 Hardy Heron
Re: sudo unable to resolve host

ivan@icarus-laptop:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 icarus-laptop.actuaria_rulz

# 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
Darkade is offline   Reply With Quote
Old March 13th, 2008   #4
PmDematagoda
The Free Multi-Distro Tux
 
PmDematagoda's Avatar
 
Join Date: Aug 2007
Location: Kottawa, Sri Lanka
Beans: 7,248
Ubuntu 8.04 Hardy Heron
Send a message via MSN to PmDematagoda Send a message via Skype™ to PmDematagoda
Re: sudo unable to resolve host

Open the hosts file for editing with:-
Code:
gksudo gedit /etc/hosts
and edit it to make it look like this:-
Code:
127.0.0.1 localhost
127.0.1.1 icarus-laptop

# 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
save the file.

That should fix the problem.
__________________
Think carefully before executing commands containing "rm", especially "sudo rm -rf ", if you require more information concerning this matter, read this.
I am an experimenter, give me the most stable OS and I can make it unstable in a few hours.

C == seriously fast == FTW!
PmDematagoda is offline   Reply With Quote
Old March 13th, 2008   #5
Darkade
Way Too Much Ubuntu
 
Darkade's Avatar
 
Join Date: Nov 2007
Location: Puebla, México
Beans: 327
Ubuntu 8.04 Hardy Heron
Re: sudo unable to resolve host

Thanks it worked
Darkade is offline   Reply With Quote
Old March 13th, 2008   #6
rhodry
5 Cups of Ubuntu
 
rhodry's Avatar
 
Join Date: Aug 2005
Location: Sydney, Australia
Beans: 40
Ubuntu 7.10 Gutsy Gibbon
Re: sudo unable to resolve host

This happened to me after upgrade to Hardy Heron. (which may or may not be relevant)

Check your /etc/hosts file.

My machine in question is "greywolf" and my domain is "home.net". I use DHCP but I have an IP address fixed by my router as 192.168.1.xx. The entry I have in the /etc/hosts file for that IP address is normally:

192.168.1.xx greywolf.home.net greywolf

The system (I assume network manager) had added the domain name to the end of the line again - ie

192.168.1.xx greywolf.home.net greywolf.home.net

I just removed the 2nd ".home.net" off the end and name resolution worked again.

This is not the 1st time this has happened to my /etc/hosts, but it was the 1st time it had caused name resolution errors in the terminal.

I just wish they would use a decent network manager like 'wicd' as the default instead of the crap they use now. Anyway, hope this helps?

rhodry.
__________________
Integrity is doing the right thing when nobody is watching you.
### Linux Registered User No. 416376 ###
rhodry is offline   Reply With Quote
Old March 23rd, 2008   #7
selda
5 Cups of Ubuntu
 
Join Date: Jun 2007
Beans: 13
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to selda Send a message via Skype™ to selda
Re: sudo unable to resolve host

Quote:
Originally Posted by rhodry View Post
This happened to me after upgrade to Hardy Heron. (which may or may not be relevant)

Check your /etc/hosts file.

My machine in question is "greywolf" and my domain is "home.net". I use DHCP but I have an IP address fixed by my router as 192.168.1.xx. The entry I have in the /etc/hosts file for that IP address is normally:

192.168.1.xx greywolf.home.net greywolf

The system (I assume network manager) had added the domain name to the end of the line again - ie

192.168.1.xx greywolf.home.net greywolf.home.net

I just removed the 2nd ".home.net" off the end and name resolution worked again.

This is not the 1st time this has happened to my /etc/hosts, but it was the 1st time it had caused name resolution errors in the terminal.

I just wish they would use a decent network manager like 'wicd' as the default instead of the crap they use now. Anyway, hope this helps?

rhodry.
I had similar problems. I use wicd and during upgrade it was unistalled, and replaced by network manager, which was not working.
__________________
My little blog
selda is offline   Reply With Quote
Old April 13th, 2008   #8
leohart
A Carafe of Ubuntu
 
Join Date: Jun 2005
Location: Earth
Beans: 90
Ubuntu Karmic Koala (testing)
Re: [SOLVED] sudo unable to resolve host

I had this problem as well after I upgraded to Hardy Heron. ^_^ Add/Remove... stopped working correctly as well and I didn't know what is going on. After this fix, things seem to get back to normal.
leohart is offline   Reply With Quote
Old April 15th, 2008   #9
falkTX
Quad Shot of Ubuntu
 
falkTX's Avatar
 
Join Date: Nov 2007
Location: Portugal
Beans: 488
Kubuntu 9.10 Karmic Koala
Re: [SOLVED] sudo unable to resolve host

I had that problem when installing FireStarter and trying to share a connection,
but now it's ok!! fixed!!

Thank you guys!
falkTX is offline   Reply With Quote
Old April 18th, 2008   #10
linuksamiko
Just Give Me the Beans!
 
linuksamiko's Avatar
 
Join Date: Apr 2006
Beans: 78
Kubuntu Jaunty Jackalope (testing)
Exclamation Re: [SOLVED] sudo unable to resolve host

I have the same problem, after updating to hardy (RC1). This problem should be fixed before the final releas!
linuksamiko is offline   Reply With Quote

Bookmarks

Tags
sudo, unable to resolve host

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:55 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry