Gentoo Archives: gentoo-dev

From: Bertram Scharpf <lists@×××××××××××××××.de>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Slapd calls nss_ldap before opening its ports
Date: Mon, 22 Oct 2007 12:15:15
Message-Id: 20071022121229.GA24735@bart.bs.l
1 Hi,
2
3 when setting up LDAP Pam authentication I encountered a
4 problem that seems to be neither Slapd- nor
5 nss_ldap-specific.
6
7 When running the init script there comes up an error that
8 clutters up my syslog with a lot of useless error messages:
9
10 @(#) $OpenLDAP: slapd 2.3.38 (Oct 18 2007 22:12:26) $ root@myhost:/var/tmp/portage/net-nds/openldap-2.3.38/work/openldap-2.3.38/servers/slapd
11 nss_ldap: failed to bind to LDAP server ldap://127.0.0.1: Can't contact LDAP server
12 nss_ldap: failed to bind to LDAP server ldap://127.0.0.1/: Can't contact LDAP server
13 nss_ldap: failed to bind to LDAP server ldapi://%2fvar%2frun%2fldapi_sock/: Can't contact LDAP server
14 ...
15 nss_ldap: could not search LDAP server - Server is unavailable
16 WARNING: No dynamic config support for database ldbm.
17 slapd starting
18
19 I found out that the Gentoo init script activates the
20 options "-u ldap -g ldap". Without them, the error messages
21 do not appear. Therefore I suppose the slapd daemon tries to
22 obtain passwd/shadow information for ldap via nss_ldap. At
23 least when I say "compat" in nsswitch.conf, the error
24 message doesn't appear as well.
25
26 The thing I really wonder about is that the lines in
27 nsswitch.conf say
28
29 passwd: files ldap
30 shadow: files ldap
31 group: files ldap
32
33 The files should be searched first. The "ldap" information
34 is present in all three of them. I even tried to chown the
35 shadow file to ldap but this didn't save me from the weird
36 messages either.
37
38 I detected I have a machine where this didn't happen. Then I
39 upgraded from glibc-2.5-r4 to glibc-2.6.1 ...
40
41 I tried to stuff log statements into glibc's nss part but
42 I'm not experienced enough in glibc to do that in finite
43 time.
44
45 Could this it a real bug in glibc or any of its patches?
46 Does anybody experience the same behaviour?
47
48 Thanks in advance,
49
50 Bertram
51
52
53 --
54 Bertram Scharpf
55 Stuttgart, Deutschland/Germany
56 http://www.bertram-scharpf.de
57 --
58 gentoo-dev@g.o mailing list

Replies