Comment 36 for bug 32906

Revision history for this message
LarryJ (larry-foxgulch) wrote : Re: sudo shouldn’t ABSOLUTELY NEED to look up the host it’s running on

I fixed my error
 "sudo: unable to resolve host lian-ubuntu-beta"
by making entries in System->Administration->Network
such that afterward the files /etc/hostname and /etc/hosts read:

$ cat /etc/hostname
lian-ubuntu-beta
lj@lian-ubuntu-beta:~$ cat /etc/hosts
127.0.0.1 localhost lian-ubuntu-beta
127.0.1.1 lian-ubuntu-beta
192.168.1.103 lian3.foxgulch.net lian3

# 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

Specifically System->Administration->Networking Unlock Then Authenticate then In the Hosts Tab
highlight the "127.0.0.1 localhost" line
click properties
make it read
IP address: 127.0.0.1
Aliases : localhost
              lian-ubuntu-beta

In the General Tab
Hostname: lian-ubuntu-beta
Domain Name: (nothing or blank)