local name resolution from /etc/hosts file not functioning
I'm wondering that the resolution is't functioning when i put a pair of IP-address/name in the file /etc/hosts I'm using SuSE 9.0 or SuSE 8.1 and have the same problem/error. The configuration files seems correct: /etc/nsswitch.conf= hosts: files dns /etc/host.conf= order hosts, bind /etc/hosts= 10.100.0.1 hello /etc/sysconfig/suseconfig= CHECK_ETC_HOSTS="yes" BEAUTIFY_ETC_HOSTS="yes" and the used command is = $ host hello. Host hello not found: 3(NXDOMAIN) ============================================== To check all the thinks ones type this : $ host hello.; egrep "^hosts|^order|hello" /etc/nsswitch.conf /etc/host.conf ; grep -H "HOSTS" /etc/sysconfig/suseconfig |grep -v "^[^:]*:#"/etc/hosts Host hello not found: 3(NXDOMAIN) /etc/nsswitch.conf:hosts: files dns /etc/host.conf:order hosts, bind /etc/hosts:10.100.0.1 hello /etc/sysconfig/suseconfig:CHECK_ETC_HOSTS="yes" /etc/sysconfig/suseconfig:BEAUTIFY_ETC_HOSTS="yes" What should i do to have it functioning ? Thanks in advance.
On Saturday 17 April 2004 00:33, gerald.maricau@versateladsl.be wrote:
I'm wondering that the resolution is't functioning when i put a pair of IP-address/name in the file /etc/hosts I'm using SuSE 9.0 or SuSE 8.1 and have the same problem/error. The configuration files seems correct:
/etc/nsswitch.conf= hosts: files dns
/etc/host.conf= order hosts, bind
/etc/hosts= 10.100.0.1 hello
/etc/sysconfig/suseconfig= CHECK_ETC_HOSTS="yes" BEAUTIFY_ETC_HOSTS="yes"
and the used command is = $ host hello. Host hello not found: 3(NXDOMAIN)
the 'host' command will always use DNS servers, it doesn't even look at nsswitch.conf. From the man page <quote> DESCRIPTION host is a simple utility for performing DNS lookups. </quote> To see, try something like strace host hello 2>&1|grep nsswitch and then try strace ping hello 2>&1|grep nsswitch "ping hello" should correctly ping 10.100.0.1
participants (2)
-
Anders Johansson
-
gerald.maricau@versateladsl.be