Red Hat Bugzilla – Bug 477145
ldapsearch and nss_ldap fail to find LDAP users
Last modified: 2012-12-16 12:30:15 EST
Description of problem:
ldapsearch and anything using nss_ldap can't contact LDAP server if it's specified by DNS name which resolves to an IPv4 address. If I specify the ldap server's IP in /etc/hosts, it starts working. According to tcpdump on port 53, no DNS requests are sent to resolve the ldap server's address.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. set up ldaps:// server somewhere on the local network
2. set up the local machine to authenticate against it (to test /bin/id)
3. ldapsearch -d 255 -H ldaps://ldap1.icm.edu.pl/ -b dc=icm,dc=edu,dc=pl -x 'uid=rathann'
4. id rathann
ldap_new_connection 1 1 0
ldap_connect_to_host: TCP ldap1.icm.edu.pl:636
ldap_connect_to_host: getaddrinfo failed: Name or service not known
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
# id rathann
id: rathann: No such user
The result of the query.
# id rathann
This could be related to bug 459756, because other applications are still complaining about failed DNS lookups:
Dec 19 12:49:41 blader ntpd_initres: host name not found: 0.fedora.pool.ntp.org
Dec 19 12:49:41 blader ntpd_initres: couldn't resolve `0.fedora.pool.ntp.org', giving up on it
Dec 19 12:49:41 blader ntpd_initres: host name not found: 1.fedora.pool.ntp.org
Dec 19 12:49:41 blader ntpd_initres: couldn't resolve `1.fedora.pool.ntp.org', giving up on it
Dec 19 12:49:41 blader ntpd_initres: host name not found: 2.fedora.pool.ntp.org
Dec 19 12:49:41 blader ntpd_initres: couldn't resolve `2.fedora.pool.ntp.org', giving up on it
What does your "hosts:" line in /etc/nsswitch.conf look like? If you're attempting to use the directory service for that, is a method which can provide resolution for the directory server's hostname listed before it?
% grep ^hosts: /etc/nsswitch.conf
hosts: files dns
It's working in current rawhide, so it must've been fixed somewhere along the way. I'll try to verify this in F11 and F10 when I get a chance.
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '10'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 10's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 10 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.