View Full Version : [ubuntu] sudo: unable to resolve host Lair

June 10th, 2008, 04:59 PM
hi all

when using terminal im getting this message

sudo: unable to resolve host Lair

when i do something like;

i.e. sudo gedit /etc/samba/smb.conf

it doesnt seem to effect whatever i am doing, but, what is it and why has it suddenly begun to occur?

Dr Small
June 10th, 2008, 05:20 PM
Post the result of these two commands, please:

cat /etc/hosts
cat /etc/hostname

June 10th, 2008, 06:51 PM
You might want to check out this thread:


Sounds like you're having the same issue.

June 11th, 2008, 07:49 AM
This just happened to me.

Write in the terminal:

sudo gedit /etc/hosts

Then, add the following line at the beginning: denise

(In my case, "denise" is my computer's name... change it for your computer's name) and save.

June 11th, 2008, 08:18 AM
fenris@Lair:~$ cat /etc/hosts localhost Lair.TOTSVILLE

# 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
fenris@Lair:~$ cat /etc/hostname

i have changed the top line as follows; Lair Lair.TOTSVILLE
now i get this in terminal when i close i.e. gedit /etc/*****

Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]fenris@Lair:~$ sudo gedit /etc/hosts

@Hal looked at the thread you indicated and have adjusted my host file in a similar fasion. result sorted ;)
now im not sure i can assist in why it suddenly began but here goes. my hostname was picked during install.
samba was installed later and i had to add a line to gain permission to create shares, i also changed the 'group'
from the default.

workgroup = TOTSVILLE << changed from the default 'workgroup'
usershare owner only = False<< added this whole line

at the time nothing occured. BUT the latest updates requested if i wanted to keep my current smb.conf or install the newer 1. i opted for the newer one, last time i refused a similar offer it caused severe problems later, and of course i had to go back in to smb.conf to re-edit as before. this is the only thing that was done after the latest updates and emmediately before it started throwing the message up. thanks for all your help guys, clicking your thanks ;)