sudo doesn't work

Jason Ribeiro jason.ribeiro at gmail.com
Fri Jul 7 00:01:34 UTC 2006


On 7/6/06, Ian Kabeary <omega21 at gmail.com> wrote:
> I get this when I try to use any command.
> Any ideas?
> sudo: unable to lookup  via gethostbyname()
>
> Thanks!
> ~Ian
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Hi Ian,

You have to make sure that your hostname, which is in the
/etc/hostname file is also in your /etc/hosts file on the line that
begins with 127.0.0.1.

Here is what my /etc/hostname looks like:
ubuntu

Here is the first line of my /etc/hosts:
127.0.0.1 localhost.localdomain localhost ubuntu

To fix your system, just reboot and choose "Recovery mode" from the
grub menu.  Then use 'nano /etc/hostname' and 'nano /etc/hosts' to fix
the files.  ctrl-o to save and ctrl-x to exit in nano.  After that
just reboot.

Hope that sorts it out for you.

Jason




More information about the ubuntu-users mailing list