sudo problem/question

Kipton Moravec kip at kdream.com
Mon Apr 12 11:59:30 UTC 2010


On Mon, 2010-04-12 at 05:35 -0400, Tom H wrote:
> On Mon, Apr 12, 2010 at 1:53 AM, Kipton Moravec <kip at kdream.com> wrote:
> > On Mon, 2010-04-12 at 01:24 -0400, Tom H wrote:
> >> On Sun, Apr 11, 2010 at 11:46 PM, Kipton Moravec <kip at kdream.com> wrote:
> >> > When I try to use sudo on one of my 8.04 Ubuntu computers I get the
> >> > message
> >> >
> >> > sudo: unable to resolve host violet
> >> >
> >> > It then asks for the password.
> >> >
> >> > The prompt is kip at violet:
> >> >
> >> > So part of the machine knows it is violet.
> >> > violet is the name of the machine in the System -> Network -> General
> >> > (Tab) -> Host Name: field.
> >> >
> >> > How do I fix it so the warning does not appear?
> >> >
> >> > I tried adding an alias in the hosts as it had
> >> >
> >> > 127.0.0.1 localhost violet.Workgroup
> >> >
> >> > so I changed it to
> >> >
> >> > 127.0.0.1 localhost violet.Workgroup violet
> >> >
> >> > but that did not fix it.
> >>
> >> Please post
> >> cat /etc/hostname
> >> cat /etc/hosts
> >>
> > kip at violet:~$ cat /etc/hostname
> > violet
> > kip at violet:~$ cat /etc/hosts
> > 127.0.0.1 localhost
> > 127.0.1.1 violet.home violet.workgroup violet.WORKGROUP
> 
> You have to boot into single/recovery mode and add violet to the 127.0.1.1 line.
> 

That fixed it.

My other computer red does not have the problem.

kip at red:~ $ cat /etc/hosts
127.0.0.1 localhost red.Workgroup
127.0.1.1 red.Workgroup


# 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


And it does not have red in the line. And it works. I do not understand.

Kip




-- 
Kipton Moravec AE5IB .- . ..... .. -...

"Always do right; this will gratify some people and astonish the rest."
--Mark Twain






More information about the ubuntu-users mailing list