Был у меня сервер OpenLDAP на FreeBSD 7.2. По ряду причин эта машина прекратила своё существование. Захотел я поставить этот же сервер со всеми настройками и данными на виртуальную машину (VMware). Ну, поставил на машину FreeBSD 7.2, обновил дерево портов, поставил openldap-server-2.4.21. Накатил на систему сохранённые с другой машины настройки (из /usr/local/etc/openldap/) и данные (из /var/db/openldap/). В настройках, естественно, переправил IP-адреса.
И вот огребаю следующую проблему. LDAP-сервер служит у меня сервером OpenPGP. Согласно настройкам, сервер должен пускать анонимных пользователей на чтение и на запись. Между тем, получается вот какая петрушка:
1. Пытаюсь искать какие-то данные с той же машины, где установлен сервер. Подключение к серверу проходит успешно, но ничего не находится:
Код: Выделить всё
# ldapsearch -L -x -b 'dc=test,dc=myserver.org' 'uid=master'
version: 1
#
# LDAPv3
# base <dc=test,dc=myserver.org> with scope subtree
# filter: uid=master
# requesting: ALL
#
# search result
No such object (32)
# numResponses: 1
Код: Выделить всё
dc=test,dc=myserver.org
3. Пытаюсь зайти тем же phpLdapAdmin с помощью root'овского логина и пароля. Заходит успешно и вываливает мне все данные, всё дерево PGP-ключей.
4. С той же машины пытаюсь искать на LDAP-сервере ключи с помощью PGP Desktop 9.10. Ключи ищет вполне успешно, несмотря на то, что этот PGP-клиент ни фига не умеет логиниться на сервер, т.е. лезет анонимно.
Я уже голову сломал над всем этим, ковыряюсь уже два дня. Подскажите, как быть!

Вот некоторая вспомогательная информация:
Ключи из /etc/rc.conf:
Код: Выделить всё
slapd_enable="YES"
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/" -f /usr/local/etc/openldap/slapd.conf -u ldap -g ldap'
slapd_sockets="/var/run/openldap/ldapi"
Код: Выделить всё
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/pgp-keyserver.schema
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
modulepath /usr/local/libexec/openldap
moduleload back_bdb
allow bind_anon_dn
loglevel 256
logfile /var/log/slapd.log
allow update_anon
TLSCertificateFile /usr/local/etc/openldap/ssl/ldap.cert
TLSCertificateKeyFile /usr/local/etc/openldap/ssl/ldap.key
TLSCACertificateFile /usr/local/etc/openldap/ssl/ca.cert
# Directives needed to implement policy:
access to dn.base="" by peername.ip=192.168.40.0%255.255.255.0 read
by peername.ip=127.0.0.1 read
access to dn.base="cn=Subschema" by peername.ip=192.168.40.0%255.255.255.0 read
by peername.ip=127.0.0.1 read
# userPassword may be written only by users themselves
access to attrs="userPassword"
by self write
by peername.ip=192.168.40.0%255.255.255.0 auth
# let PGP discover the keystore base DN
access to dn="cn=pgpServerInfo,dc=test,dc=myserver.org"
by peername.ip=192.168.40.0%255.255.255.0 read
by peername.ip=127.0.0.1 read
# PGP keystore: only localhost may write, anyone can read
access to dn.subtree="ou=PGP Keys,dc=test,dc=myserver.org"
by peername.ip=192.168.40.0%255.255.255.0 write
by peername.ip=127.0.0.1 write
by * read
# deny any other access
access to *
by self write
by * none
database bdb
suffix "dc=test,dc=myserver.org"
rootdn "cn=root,dc=test,dc=myserver.org"
rootpw {SSHA}gT7lboYEok4MqOMyRru2dJ3yMpdD4q4B
directory /var/db/openldap-data
index objectClass eq
index pgpCertID,pgpKeyID,pgpKeyType,pgpUserID,pgpKeyCreateTime sub,eq
index pgpSignerID,pgpSubKeyID,pgpKeySize,pgpKeyExpireTime sub,eq
index pgpDisabled,pgpRevoked eq
Код: Выделить всё
Jan 2 13:25:04 test slapd[716]: conn=1006 fd=12 ACCEPT from IP=127.0.0.1:61101 (IP=0.0.0.0:389)
Jan 2 13:25:04 test slapd[716]: conn=1006 op=0 BIND dn="" method=128
Jan 2 13:25:04 test slapd[716]: conn=1006 op=0 RESULT tag=97 err=0 text=
Jan 2 13:25:04 test slapd[716]: conn=1006 op=1 SRCH base="dc=test,dc=myserver.org" scope=2 deref=0 filter="(uid=master)"
Jan 2 13:25:04 test slapd[716]: conn=1006 op=1 SEARCH RESULT tag=101 err=32 nentries=0 text=
Jan 2 13:25:04 test slapd[716]: conn=1006 op=2 UNBIND
Jan 2 13:25:04 test slapd[716]: conn=1006 fd=12 closed
Код: Выделить всё
Jan 2 13:25:21 test slapd[716]: conn=1010 fd=12 ACCEPT from IP=192.168.40.1:4275 (IP=0.0.0.0:389)
Jan 2 13:25:21 test slapd[716]: conn=1010 op=0 BIND dn="cn=root,dc=test,dc=myserver.org" method=128
Jan 2 13:25:21 test slapd[716]: conn=1010 op=0 BIND dn="cn=root,dc=test,dc=myserver.org" mech=SIMPLE ssf=0
Jan 2 13:25:21 test slapd[716]: conn=1010 op=0 RESULT tag=97 err=0 text=
Jan 2 13:25:21 test slapd[716]: conn=1010 op=1 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
Jan 2 13:25:21 test slapd[716]: conn=1010 op=1 SRCH attr=namingContexts
Jan 2 13:25:21 test slapd[716]: conn=1010 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jan 2 13:25:21 test slapd[716]: conn=1010 op=2 SRCH base="dc=test,dc=myserver.org" scope=2 deref=3 filter="(uid=master)"
Jan 2 13:25:21 test slapd[716]: conn=1010 op=2 SRCH attr=cn sn uid postalAddress telephoneNumber
Jan 2 13:25:21 test slapd[716]: <= bdb_equality_candidates: (uid) not indexed
Jan 2 13:25:21 test slapd[716]: conn=1010 op=2 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jan 2 13:25:21 test slapd[716]: conn=1011 fd=16 ACCEPT from IP=192.168.40.1:4278 (IP=0.0.0.0:389)
Jan 2 13:25:21 test slapd[716]: conn=1011 op=0 BIND dn="cn=root,dc=test,dc=myserver.org" method=128
Jan 2 13:25:21 test slapd[716]: conn=1011 op=0 BIND dn="cn=root,dc=test,dc=myserver.org" mech=SIMPLE ssf=0
Jan 2 13:25:21 test slapd[716]: conn=1011 op=0 RESULT tag=97 err=0 text=
Jan 2 13:25:21 test slapd[716]: conn=1010 op=3 SRCH base="uid=master,ou=PGP Users,dc=test,dc=myserver.org" scope=0 deref=0 filter="(objectClass=*)"
Jan 2 13:25:21 test slapd[716]: conn=1010 op=3 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jan 2 13:25:21 test slapd[716]: conn=1010 op=4 SRCH base="dc=test,dc=myserver.org" scope=0 deref=0 filter="(objectClass=*)"
Jan 2 13:25:21 test slapd[716]: conn=1010 op=4 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jan 2 13:25:21 test slapd[716]: conn=1010 op=5 UNBIND
Jan 2 13:25:21 test slapd[716]: conn=1010 fd=12 closed