[GLLUG] /ect/hosts gone bad
Stephan Andre'
andres at msu.edu
Tue Jul 3 13:50:08 EDT 2007
On Tuesday 03 July 2007 13:39:13 Jordan Robison wrote:
> I was messing with the hosts file and changed something around and I spent
> the rest of the night trying to fix it. Here is the problem that happens
> every time I use sudo:
> sudo: unable to lookup jordan via gethostbyname()
>
> I am not able to do anything under Su and from what it looks like is that I
> might have to reformat unless you geniuses out there know of any better way
> of helping me fix this problem.
You give no indication as to what operating system you're using, but if you
have single-user mode, you ought to be able to boot up into that, and then
fix the hosts file.
This is also a good time to develop a system of saving and storing critical
data files, such that if they get munged they can be restored quickly. My
/etc (OpenBSD) is about 8M in size, so its easy for me to make a tarball
of that dir frequently. Add /var/log, /var/www and perhaps a few others
and you have the core of a configuration backup.
--STeve Andre'
More information about the linux-user
mailing list