Настроил slapd, стартует нормально, но при добавлении информации командой slapadd -v -l main.ldif выдает ошибку:
ldap# slapadd -v -l main.ldif
bdb_db_open: database already in use
backend_startup_one: bi_db_open failed! (-1)
slap_startup failed
Вот slapd.conf:
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/corba.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/java.schema
include /etc/ldap/schema/misc.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/openldap.schema
pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args
modulepath /usr/lib/ldap
moduleload back_bdb
database dbd
suffix "dc=test,dc=ru"
rootdn "cn=admin,dc=test,dc=ru"
rootpw secret
directory /var/lib/ldap
index objectClass,uid,uidNumber,gidNumber eq
index cn,mail,surname,givenname eq,subinitial
access to attr=userPassword
by self write
by anonymous auth
by dn="uid=root,dc=test,dc=ru" write
by * none
access to *
by dn="uid=root,dc=test,dc=ru" write
by * read
Авот main.ldif:
dn: dc=test,dc=ru
objectclass: dcObject
objectclass: organization
o: test
dc: test
dn: cn=admin,dc=test,dc=ru
objectclass: organizationalRole
cn: admin
dn: ou=users,dc=test,dc=ru
ou: users
objectclass: top
objectclass: organizationalUnit
dn: uid=null,ou=users,dc=test,dc=ru
uid: null
cn: Neo
objectclass: account
objectclass: posixAccount
objectclass: top
objectclass: uidObject
loginshell: /bin/zsh
uidnumber: 1000
gidnumber: 1000
homedirectory: /home/null
gecos: Neo
userpassword: $1$abcdvPbaLa6vs4ABab1N
>>>