Oops .. I broke Sudo

Harry Courtice hcourtice at optusnet.com.au
Sun Nov 19 10:56:55 UTC 2006


I am using ubuntu 6.06 in a VMWare VM. I am using the free player and used
quemu to do the initial setup.

I accidentally edited /etc/hosts instead of /mnt/debian/etc/hosts (my baby
was crying .. I was distracted :-(    ).

Now I can't use sudo - I get an error about failed hostname lookup.

Sudo: unable to lookup <computer-name> via gethostbyname()

When I edited hosts, I changed <computer-name> to <another-computer-name>,
for addresses and

Su does still work, but I don't know the root password - I haven't touched
it since installing.

Is there any way I can edit /etc/hosts without sudo ? (No, I didn't add a
user "root" before everything went wrong).

Thanks (in advance)


More information about the ubuntu-users mailing list