Quote:
Originally Posted by bathory
Are you sure you're using the correct slapd.conf? Because you get an error about TLS, but the TLS part is commented out in the slapd.conf you've posted.
Since slaptest (using /etc/openldap/slapd.conf) complains, you should try to run slapd or slaptest (as root) from command line and see if you get more info. Could be a permissions problem.
Code:
slapd -f /etc/openldap/slapd.conf -d255
slaptest -f /usr/local/etc/openldap/slapd.conf -d 255
|
thnx for the tip
I've run the commands and indeed the first config file had problems with it. What they are I still have to find out.
Now if I run "service ldap start" I get less errors, and a few of them I solved immediatly like directory's that didn't exist yet and permissions that had to be set. for the purpose of getting my ldap running I coppied the /usr/local/etc/openldap/slapd.conf to the /etc/openldap/ directory.
the errro that I still have in my ldap log file is
-----------------------------
Jun 19 08:22:36 loadpc6 slapd[2438]: @(#) $OpenLDAP: slapd 2.2.13 (Apr 20 2005 18:32:13) $
root@decompose.build.redhat.com:/usr/src/build/557148-i386/BUILD/openldap-2.2.13/openldap-2.2.13/build-servers/servers/slapd
Jun 19 08:22:36 loadpc6 slapd[2438]: bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
Jun 19 08:22:36 loadpc6 slapd[2438]: bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
Jun 19 08:22:36 loadpc6 slapd[2438]: bdb_db_init: Initializing BDB database
Jun 19 08:22:36 loadpc6 slapd[2438]: main: TLS init def ctx failed: -1
Jun 19 08:22:36 loadpc6 slapd[2438]: slapd stopped.
Jun 19 08:22:36 loadpc6 slapd[2438]: connections_destroy: nothing to destroy.
---------------------------
this was my old ldap.conf
---------------------------
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
# Uncomment the NIS schema to support Linux login authentication
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/redhat/rfc822-MailMember.schema
include /etc/openldap/schema/redhat/autofs.schema
include /etc/openldap/schema/redhat/kerberosobject.schema
# Define global ACLs to disable default read access.
#allow bind_v2
loglevel -1
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
# Load dynamic backend modules:
# modulepath /usr/sbin/openldap
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
moduleload back_bdb.la
# To allow TLS-enabled connections, create /usr/share/ssl/certs/slapd.pem
# and uncomment the following lines.
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
#######################################################################
# ldbm database definitions / in dit geval is het een BerkeleyDB
#######################################################################
#database dbd
database ldbm
suffix "dc=isabel, dc=be"
#hier staat de root of superuser
rootdn "cn=SiteAdmin, dc=isabel, dc=be"
rootpw isabel
#directory moet bestaan voor de ldap server gestart wordt
directory /var/lib/ldap/isabel-be
#unieke ID
index uid eq
#toelaten zoekopdrachten op naam, email, enz ...
index cn,gn,mail eq,sub
#toelaten variaties in zoekopdrachten
index sn eq,sub
#optimalisatie departementdoorzoekingen
index ou eq
#toon gebruik van de standaard index parameter
index default eq,sub
#ontbrekend indenties - gebruik default eq,sub
index telephonenumber
cachesize 10000
checkpoint 128 15
---------------------------
and this is the new (and short) one I copied
---------------------------
#######################################################################
# BDB database definitions
#######################################################################
database bdb
suffix "dc=ISABEL,dc=BE"
rootdn "cn=root,dc=ISABEL,dc=BE"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw isabel
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap/isabel-be
# Indices to maintain
index objectClass eq
---------------------------
and when I run the service ldap start command again I still get that weird output, but now it contains a lot of green text
---------------------------
[root@loadpc6 openldap]# service ldap start
+ user=ldap
++ id -u ldap
+ ldapuid=55
++ grep '^directory' /etc/openldap/slapd.conf
++ sed 's,^directory,,'
+ for dbdir in '`grep ^directory /etc/openldap/slapd.conf | sed s,^directory,,`'
++ find /var/lib/ldap/isabel-be/ -not -uid 55 -and '(' -name '*.dbb' -or -name '*.gdbm' -or -name '*.bdb' ')'
+ echo -n 'Checking configuration files for : '
Checking configuration files for : + /usr/sbin/slaptest
config file testing succeeded
+ RETVAL=0
+ test 0 -eq 0
+ success
+ '[' -z '' ']'
+ initlog -q -n /etc/init.d/ldap -s '' -e 1
+ '[' color '!=' verbose -a -z '' ']'
+ echo_success
+ '[' color = color ']'
+ echo -en '\033[60G'
+ echo -n '[ '
[ + '[' color = color ']'
+ echo -en '\033[0;32m'
+ echo -n OK
OK+ '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ' ]'
]+ echo -ne '\r'
+ return 0
+ return 0
++ basename /usr/sbin/slapd
+ prog=slapd
+ echo -n 'Starting slapd: '
Starting slapd: + grep -q '^TLS' /etc/openldap/slapd.conf
+ daemon /usr/sbin/slapd -u ldap -h ldap:///
+ local gotbase= force=
+ local base= user= nice= bg= pid=
+ nicelevel=0
+ '[' /usr/sbin/slapd '!=' /usr/sbin/slapd ']'
+ '[' -z '' ']'
+ base=slapd
+ '[' -f /var/run/slapd.pid ']'
+ '[' -n '' -a -z '' ']'
+ ulimit -S -c 0
+ '[' -n '' ']'
+ '[' color = verbose -a -z '' ']'
+ '[' -z '' ']'
+ initlog -q -c '/usr/sbin/slapd -u ldap -h ldap:///'
+ '[' 1 -eq 0 ']'
+ failure 'slapd startup'
+ rc=1
+ '[' -z '' ']'
+ initlog -q -n /etc/init.d/ldap -s 'slapd startup' -e 2
+ '[' color '!=' verbose -a -z '' ']'
+ echo_failure
+ '[' color = color ']'
+ echo -en '\033[60G'
+ echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[0;31m'
+ echo -n FAILED #
FAILED+ '[' color = color ']' # this is still in a red color
+ echo -en '\033[0;39m' #
+ echo -n ']'
]+ echo -ne '\r'
+ return 1
+ '[' -x /usr/bin/rhgb-client ']'
+ /usr/bin/rhgb-client --details=yes
+ return 1
+ RETVAL=1
+ echo
+ '[' 1 -eq 0 ']'
+ '[' 1 -eq 0 ']'
+ return 1
+ exit 1
---------------------------
I know that the password is in cleartext and that there are probably some other security issues, but that doesn't matter coz this is my trial&error fase just to get the ldap service running. If anybody has a good step by step guidline for ldap on a clean install from scratch, this could be very helpfull but all the tutorials I found were about just installing it, and nothing about the other requirements like eg : gcc, berkeleyDB and such or about the config files and how to test everything.