Bug 54646 - nscd does not resolve hosts that are in ldap but not in dns, even if there is instruction in nsswitch.conf to use ldap for resolving hosts
Summary: nscd does not resolve hosts that are in ldap but not in dns, even if there is...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-15 12:42 UTC by Jure Pecar
Modified: 2016-11-24 15:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-04-17 17:07:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Jure Pecar 2001-10-15 12:42:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.8 i686)

Description of problem:
(i'm reporting this under glibc, as there is NO nscd entry in bugzilla for
roswell :)

It seems that nscd only uses dns to resolve hostnames and that it makes no
use of hosts line in nsswitch.conf. So, if i have a host that is in ldap
and not in dns and have a line like 'hosts files dns ldap' in
nsswitch.conf, i can't ping that host if i have nscd running.

Version-Release number of selected component (if applicable):
redhat 7.1.94 (glibc 2.2.4-5, nscd-2.2.4-5)

How reproducible:
Always

Steps to Reproduce:
1. Have a mixed dns/ldap enviroment.
2. Have some hosts in dns AND ldap, have some host in dns only and in ldap
only.
3. Ping each of those with nscd on and off. 
	

Actual Results:  All hosts should get resolved properly if nscd is off.
When you turn nscd on, ping says 'unknown host' to those in ldap only,
regardles of the contents in nsswitch.conf and nscd.conf.

Expected Results:  I would really expect from nscd to parse the hosts line
in nsswitch.conf and if there is ldap mentioned, use ldap for hosts
resolving too.

Additional info:

relevant nsswitch.conf lines:

passwd	files ldap
shadow	files ldap
group:	files ldap
hosts	files dns ldap

relevant lines in nscd.conf:

enable-cache	hosts	yes
positive-time-to-live	hosts	7200
negative-time-to-live	hosts	20
suggested-size	hosts	211
check-files		hosts	yes

Comment 1 Ulrich Drepper 2003-04-17 17:07:50 UTC
I cannot reproduce this (anymore?).  I'm using glibc 2.3.2-27.9 and the current
nss_ldap.

# ping ht2
ping: unknown host ht2

Now I add ldap to the services for hosts:

# ping ht2
PING ht2 (192.168.7.75) 56(84) bytes of data.
64 bytes from ht (192.168.7.75): icmp_seq=1 ttl=64 time=0.049 ms



Note You need to log in before you can comment on or make changes to this bug.