centos: unknown host localhost
suddenly fetchmail cant resolve localhost anymore, so i tried ping localhost and i got
"ping: unknown host localhost"
apart from configuring apache and running out of diskspace yesterday (fixed that), i cant remember to have changed anything related to my network config. resolv.conf has this in it:
; generated by /sbin/dhclient-script
search members.linode.com
nameserver 97.107.133.4
nameserver 207.192.69.4
nameserver 207.192.69.5
an etc/hosts is like this:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost localhost.localdomain
::1 localhost6.localdomain6 localhost6
can anyone tell me what i could have messed up, since the setup worked fine until today? my fqdn resolves fine from outside and from the console, its just localhost not resolving anymore i guess.
thx!
5 Replies
hosts: files dns
Note that the file time reported by "ls -l" doesn't necessarily mean the last time the file was changed. Normally "ls -lc" would help, but since you've now changed the file that information is missing.
There are plenty more lines in a normal nsswitch.conf; mine has the following:
passwd: files
shadow: files
group: files
hosts: files dns
bootparams: files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: files
publickey: files
automount: files
aliases: files
.
Some of those may be defaults so aren't needed
find / -size 0