I reinstalled linux, and followed this best howto.
working
# apt-get install slapd ldap-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
odbcinst odbcinst1debian1 unixodbc
Suggested packages:
libmyodbc odbc-postgresql tdsodbc unixodbc-bin
The following NEW packages will be installed:
ldap-utils odbcinst odbcinst1debian1 slapd unixodbc
0 upgraded, 5 newly installed, 0 to remove and 208 not upgraded.
Need to get 2,047kB of archives.
After this operation, 5,353kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1
http://http.us.debian.org squeeze/main odbcinst 2.2.11-21 [34.5kB]
Get:2
http://http.us.debian.org squeeze/main odbcinst1debian1 2.2.11-21 [60.7kB]
Get:3
http://http.us.debian.org squeeze/main unixodbc 2.2.11-21 [199kB]
Get:4
http://http.us.debian.org squeeze/main slapd 2.4.17-2.1 [1,469kB]
Get:5
http://http.us.debian.org squeeze/main ldap-utils 2.4.17-2.1 [284kB]
Fetched 2,047kB in 13s (154kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Preconfiguring packages ...
Configuring slapd
-----------------
Please enter the password for the admin entry in your LDAP directory.
Administrator password:
Please enter the admin password for your LDAP directory again to verify that you have typed it correctly.
Confirm password:
Please enter the admin password for your LDAP directory again to verify that you have typed it correctly.
Confirm password:
Selecting previously deselected package odbcinst.
(Reading database ... 119718 files and directories currently installed.)
Unpacking odbcinst (from .../odbcinst_2.2.11-21_i386.deb) ...
Selecting previously deselected package odbcinst1debian1.
Unpacking odbcinst1debian1 (from .../odbcinst1debian1_2.2.11-21_i386.deb) ...
Selecting previously deselected package unixodbc.
Unpacking unixodbc (from .../unixodbc_2.2.11-21_i386.deb) ...
Selecting previously deselected package slapd.
Unpacking slapd (from .../slapd_2.4.17-2.1_i386.deb) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Selecting previously deselected package ldap-utils.
Unpacking ldap-utils (from .../ldap-utils_2.4.17-2.1_i386.deb) ...
Processing triggers for man-db ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Setting up ldap-utils (2.4.17-2.1) ...
Setting up odbcinst (2.2.11-21) ...
Setting up odbcinst1debian1 (2.2.11-21) ...
Setting up unixodbc (2.2.11-21) ...
Setting up slapd (2.4.17-2.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Creating new user openldap... done.
Creating initial slapd configuration... done.
_#################### 100.00% eta none elapsed none fast!
Closing DB...
done.
Starting OpenLDAP: slapd.
dpkg-reconfigure slapd
Omit OpenLDAP server configuration? no
DNS domain name: example.org
Name of your organization: example_organization
Admin password: secret
Database backend to use: BDB
Do you want your database to be removed when slapd is purged? no
move old database yes
Allow LDAPv2 protocol? no
Stopping OpenLDAP: slapd.
Moving old database directory to /var/backups:
- directory unknown... done.
Creating initial slapd configuration... done.
_#################### 100.00% eta none elapsed none fast!
Closing DB...
done.
Starting OpenLDAP: slapd.
ldapsearch -x -b dc=example,dc=org
# ldapsearch -x -b dc=example,dc=org
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=org> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# example.org
dn: dc=example,dc=org
objectClass: top
objectClass: dcObject
objectClass: organization
o: example_organization
dc: example
# admin, example.org
dn: cn=admin,dc=example,dc=org
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
# search result
search: 2
result: 0 Success
# numResponses: 3
# numEntries: 2
cd /etc/ldap
# cat base.ldif
dn: ou=People,dc=example,dc=org
ou: People
objectClass: top
objectClass: organizationalUnit
dn: ou=Group,dc=example,dc=org
ou: Group
objectClass: top
objectClass: organizationalUnit
ldapadd -x -D "cn=admin,dc=example,dc=org" -W -f base.ldif
# ldapadd -x -D "cn=admin,dc=example,dc=org" -W -f base.ldif
Enter LDAP Password:
adding new entry "ou=People,dc=example,dc=org"
adding new entry "ou=Group,dc=example,dc=org"
# cat group.ldif
dn: cn=ldapusers,ou=Group,dc=example,dc=org
objectClass: posixGroup
objectClass: top
cn: ldapusers
userPassword: {crypt}x
gidNumber: 9000
ldapadd -x -D "cn=admin,dc=example,dc=org" -W -f group.ldif
/etc/ldap# ldapadd -x -D "cn=admin,dc=example,dc=org" -W -f group.ldif
Enter LDAP Password:
adding new entry "cn=ldapusers,ou=Group,dc=example,dc=org"
/etc/ldap# cat myuser.ldif
dn: cn=Myuser,ou=People,dc=example,dc=org
cn: Myuser
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
sn: User
uid: myuser
uidNumber: 1025
gidNumber: 9000
homeDirectory: /tmp
/etc/ldap# ldapadd -x -D "cn=admin,dc=example,dc=org" -W -f myuser.ldif
Enter LDAP Password:
adding new entry "cn=Myuser,ou=People,dc=example,dc=org"
etc/ldap# tar cvf /root/ldap-server-installed.tar.gz /etc/ssl/ /etc/ldap/ /etc/passwd /var/lib/ldap/
(I will make this post in edited in some 10min, with formating)
+ provide a tar.gz with the configuration files.