Skip to content

Commit e939868

Browse files
author
Carlo Contavalli
committed
Added README, and basic instructions on bringing up slapd.
1 parent 3a9dada commit e939868

3 files changed

Lines changed: 107 additions & 43 deletions

File tree

README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
What is this?
2+
=============
3+
4+
ldap-torture is a set of perl libraries and tools to torture your ldap
5+
installation, and verify that it is up to your production standards!
6+
7+
When we say torture we really mean send randomized search, inserts,
8+
delete, moves, ... with an high degree of configurability, with the
9+
idea of producing a load that might be similar to what you will experience
10+
in your production environment.
11+
12+
The focus of the tool is in correctness and finding problems: for each
13+
operation, it verifies that the result is as expected, or close enough
14+
to what is expected. It reports crashes or unexpected results.
15+
16+
If you need a loadtest instead, verifying how many requests per seconds
17+
your ldap installation can take, this might not be the right tool. However,
18+
it might be a reasonable starting point.
19+
20+
It was written a long time ago, around 2004, and used a few times
21+
since, and finally uploaded on a public repository.
22+
23+
24+
Getting started
25+
===============
26+
27+
We assume here that you have a Debian based system, you want to test
28+
openldap, and you are ok with using the included example config file.
29+
For other systems, the instructions here should be enough to get you
30+
started.
31+
32+
1) Install openldap and useful tools:
33+
34+
$ sudo apt-get install slapd ldap-utils
35+
36+
2) Create a database directory (has to be the same one specified in
37+
your slapd.conf file):
38+
39+
$ mkdir -p /tmp/slapd
40+
41+
3) Create an empty ldap database with basic data:
42+
43+
$ /usr/sbin/slapadd -f ./examples/slapd.conf < ./examples/base.ldiff
44+
45+
4) Start slapd. I generally suggest to start it with debugging enabled
46+
until you can get it running successfully:
47+
48+
$ /usr/sbin/slapd -d'Any' -f./examples/slapd.conf -h "ldap://127.0.0.1:9009/"
49+
50+
Note that this will start slapd listening on port 9009 on localhost
51+
only.
52+
53+
5) Verify that slapd is up and running:
54+
55+
$ ldapsearch -x -H "ldap://127.0.0.1:9009/" -b dc=test,dc=it
56+
57+
Note that slapd has been configured to ask for no password. An error here
58+
most likely means that slapd had some trouble starting. Errors are not
59+
always well reported by slapd, you might find the information you need
60+
to troubleshoot by scrolling up the screen where you started slapd,
61+
or checking /var/log/syslog (as root).
62+
63+
6) Once ldapsearch succeeds, you are ready to rock! you probably want
64+
to killall -TERM slapd, and restart it without -d Any, so to avoid
65+
spamming your screen.
66+
67+
7) Run ldap-torture.
68+
69+
70+
Issues? Questions? Updates?
71+
===========================
72+
73+
Please use the github pages. In particular, you can find:
74+
75+
* Latest tarball and all previous versions:
76+
https://github.com/ccontavalli/ldap-torture/tags
77+
78+
* Latest source code:
79+
https://github.com/ccontavalli/ldap-torture/
80+
81+
* Report issues / ask questions:
82+
https://github.com/ccontavalli/ldap-torture/issues
83+
File renamed without changes.

examples/slapd.conf

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,34 @@ allow bind_v2 bind_anon_cred bind_anon_dn update_anon
1414
include /etc/ldap/schema/core.schema
1515

1616
## pigeonair required schemes
17-
include /etc/ldap/pigeonair/generic.schema
18-
include /etc/ldap/pigeonair/domains.schema
19-
20-
## modules schema
21-
include /etc/ldap/pigeonair/mailStore.schema
22-
include /etc/ldap/pigeonair/mailForward.schema
23-
include /etc/ldap/pigeonair/mailHidden.schema
24-
include /etc/ldap/pigeonair/mailAlias.schema
25-
include /etc/ldap/pigeonair/mailAntivirus.schema
26-
include /etc/ldap/pigeonair/mailNewsletter.schema
27-
include /etc/ldap/pigeonair/mailSanitizer.schema
28-
include /etc/ldap/pigeonair/mailVacation.schema
29-
include /etc/ldap/pigeonair/mailAntispam.schema
17+
#include /etc/ldap/pigeonair/generic.schema
18+
#include /etc/ldap/pigeonair/domains.schema
19+
#
20+
### modules schema
21+
#include /etc/ldap/pigeonair/mailStore.schema
22+
#include /etc/ldap/pigeonair/mailForward.schema
23+
#include /etc/ldap/pigeonair/mailHidden.schema
24+
#include /etc/ldap/pigeonair/mailAlias.schema
25+
#include /etc/ldap/pigeonair/mailAntivirus.schema
26+
#include /etc/ldap/pigeonair/mailNewsletter.schema
27+
#include /etc/ldap/pigeonair/mailSanitizer.schema
28+
#include /etc/ldap/pigeonair/mailVacation.schema
29+
#include /etc/ldap/pigeonair/mailAntispam.schema
3030

3131
include /etc/ldap/schema/cosine.schema
3232
include /etc/ldap/schema/nis.schema
3333
include /etc/ldap/schema/inetorgperson.schema
3434

3535
# Schema check allows for forcing entries to
3636
# match schemas for their objectClasses's
37-
schemacheck on
37+
#schemachecking on
3838

3939
# Where the pid file is put. The init.d script
4040
# will not stop the server if you change this.
41-
pidfile /var/run/slapd/slapd.pid
41+
pidfile /tmp/slapd/slapd.pid
4242

4343
# List of arguments that were passed to the server
44-
argsfile /var/run/slapd.args
44+
argsfile /tmp/slapd/slapd.args
4545

4646
# Read slapd.conf(5) for possible values
4747
loglevel 0
@@ -50,13 +50,12 @@ loglevel 0
5050
modulepath /usr/lib/ldap
5151
moduleload back_hdb
5252

53+
5354
#######################################################################
5455
# Specific Backend Directives for bdb:
5556
# Backend specific directives apply to this backend until another
5657
# 'backend' directive occurs
57-
backend hdb
58-
checkpoint 1024 30
59-
cachesize 10000
58+
#backend hdb
6059

6160
#######################################################################
6261
# Specific Backend Directives for 'other':
@@ -71,10 +70,13 @@ cachesize 10000
7170
database hdb
7271

7372
# The base of your directory in database #1
74-
suffix "dc=pippo,dc=it"
73+
suffix "dc=test,dc=it"
74+
75+
checkpoint 1024 30
76+
cachesize 10000
7577

7678
# Where the database file are physically stored for database #1
77-
directory "/var/lib/ldap/deliver"
79+
directory "/tmp/slapd/"
7880

7981
# Indexing options for database #1
8082
index objectClass eq
@@ -90,11 +92,7 @@ lastmod on
9092
# Others should not be able to see it, except the
9193
# admin entry below
9294
# These access lines apply to database #1 only
93-
access to attrs=userPassword
94-
by dn="cn=admin,dc=pippo,dc=it" write
95-
by anonymous auth
96-
by self write
97-
by * none
95+
access to * by * write
9896

9997
# Ensure read access to the base for things like
10098
# supportedSASLMechanisms. Without this you may
@@ -127,20 +125,3 @@ access to *
127125

128126
# The base of your directory for database #2
129127
#suffix "dc=debian,dc=org"
130-
131-
database hdb
132-
133-
# The base of your directory in database #1
134-
suffix "dc=test,dc=it"
135-
136-
# Where the database file are physically stored for database #1
137-
directory "/var/lib/ldap/tester"
138-
139-
# Indexing options for database #1
140-
index objectClass eq
141-
142-
# Save the time that the entry gets modified, for database #1
143-
lastmod on
144-
145-
146-
access to * by * write

0 commit comments

Comments
 (0)