Mailinglist Archive: opensuse (1165 mails)

< Previous Next >
Re: [opensuse] localhost unknown host
Philipp Thomas wrote:
On Tue, 13 Mar 2012 04:27:20 -0400, Dirk Gently
<dirk.gently00@xxxxxxxxx> wrote:

Is there ANY other possible explanation?
ping localhost still returns unknown host :-(

A 'strace -f -e trace=file ping localhost' should at least show you
that /etc/hosts is really ignored. If you haven't already tried, stop
nscd and try then.

Philipp


root@linux-c4zg:~> ps -ef | grep nscd
root 18787 18076 0 05:10 pts/15 00:00:00 grep --color=auto nscd
root@linux-c4zg:~> strace -f -e trace=file ping localhost
execve("/bin/ping", ["ping", "localhost"], [/* 123 vars */]) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/libcap.so.2", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/etc/resolv.conf", O_RDONLY) = 4
stat64("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=908, ...}) = 0
open("/etc/resolv.conf", O_RDONLY) = 4
open("/etc/nsswitch.conf", O_RDONLY) = 4
open("/etc/ld.so.cache", O_RDONLY) = 4
open("/lib/libnss_files.so.2", O_RDONLY) = 4
open("/etc/host.conf", O_RDONLY) = 4
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
open("/etc/ld.so.cache", O_RDONLY) = 4
open("/lib/libnss_dns.so.2", O_RDONLY) = 4
open("/lib/libresolv.so.2", O_RDONLY) = 4
stat64("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=908, ...}) = 0
ping: unknown host localhost
root@linux-c4zg:~> cd /etc
root@linux-c4zg:/etc> grep localhost /etc/hosts
127.0.0.1 localhost
::1 localhost ipv6-localhost ipv6-loopback
root@linux-c4zg:/etc> more nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# compat Use compatibility setup
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# [NOTFOUND=return] Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#

# passwd: files nis
# shadow: files nis
# group: files nis

passwd: compat files xos
group: compat files xos

# hosts: files mdns4_minimal [NOTFOUND=return] dns
hosts: files dns
networks: files dns

services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files nis
publickey: files

bootparams: files
automount: files nis
aliases: files

root@linux-c4zg:/etc>
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups