[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Problem storing and retrieving data from DB



Today at 9:09am, Yasrebi, Mehrad wrote:

> Hi there!
>  
> I am new to OpenLDAP, and I have been trying to get the toy examples going.
> But, I am
> having some problems. Having searched the archives here, I suspect that my 
> problem/error is rather simple, but I am at a loss as to what is wrong! 
> So, I hope this is the right forum for me to understand what the problem is.
> 
>  
> I use "ldapsearch" before and after using "ldapadd", and can not find any 
> records added in. Some info about the "directory"  may be useful:
>   1) /var/lib is owned by "ldap" user and group.
>   2) /var/lib has only one file ("dn2id.gdbm"), even after ldapadd!
>   3) All of the /usr/bin/ldap* commands are owned by root user and group.

I am assuming that there is a typo there and points 1 and 2 should 
really be talking about /var/lib/ldap as the directory.

Given the slapd.conf file you included below, there should have been 
both the dn2id.gdbm and cn.gdbm files in that directory.

You are having an error doing the ldapadd.  I believe the admin guide 
states that you need to use slapadd to get the very root of your 
database installed.  So, try the following:

1) normalize the dn's in your ldif file (that is, remove the embedded 
spaces)

2) service ldap stop (or just kill off all slapd processes)

3) slapadd -f ldap00.ldif

4) chown -R ldap:ldap /var/lib/ldap

5) start slapd (either as you did or "service ldap start")

6) do the ldapsearch

> Note: Based on reading these problem reports, I am led to expect that the
> message  "daemon: socket() failed errno=97 (Address family not supported by
> protocol)" message 
> is not  a problem (re: msg by Kurt D. Zeilenga on 02 Nov, 2000).

Correct, this is (usually) just complaining that TCP6 isn't configured 
on your system.  You can completely eliminate this error message by 
building openldap without tcp6 support.

> Also, I wonder whether the reason that I have two ldap.conf files 
> is due to having two separate and likely uncooperative 
> ldap (client and server) packages in Linux.

Absolutely NOT!  /etc/ldap.conf is used by the nss-ldap package and 
/etc/openldap/ldap.conf is used by the openldap client programs.

-- 
Frank Swasey                    | http://www.uvm.edu/~fcs
Systems Programmer              | Always remember: You are UNIQUE,
University of Vermont           |    just like everyone else.
                    === God Bless Us All ===