ldapopenldapzimbra

Replicated LDAP Server, cannot bind but can verify password


I have succesfully replicated Zimbra LDAP server to standalone OpenLDAP server. I plan to use the replicated server as central LDAP server for our internal application authentication service.

Steps that I follow to replicate Zimbra LDAP are: 1. Install new OpenLDAP server. 2. Copy all schema definition from Zimbra to new server 3. Add new database with olcSuffix: "" and add replication and other configs:

dn: olcDatabase={2}mdb,cn=config
objectClass: olcMdbConfig
olcDatabase: {2}mdb
olcDbDirectory: /var/lib/ldap1
olcSuffix:
olcDbIndex: entryUUID eq
olcDbIndex: objectClass eq
olcDbIndex: entryCSN eq
olcDbIndex: cn pres,eq,sub
olcDbIndex: uid pres,eq
olcDbIndex: zimbraForeignPrincipal eq
olcDbIndex: zimbraYahooId eq
olcDbIndex: zimbraId eq
olcDbIndex: zimbraVirtualHostname eq
olcDbIndex: zimbraVirtualIPAddress eq
olcDbIndex: zimbraMailDeliveryAddress eq,sub
olcDbIndex: zimbraAuthKerberos5Realm eq
olcDbIndex: zimbraMailForwardingAddress eq
olcDbIndex: zimbraMailCatchAllAddress eq,sub
olcDbIndex: zimbraMailHost eq
olcDbIndex: zimbraMemberOf eq
olcDbIndex: zimbraShareInfo sub
olcDbIndex: zimbraSharedItem eq,sub
olcDbIndex: zimbraMailTransport eq
olcDbIndex: zimbraMailAlias eq,sub
olcDbIndex: zimbraACE sub
olcDbIndex: zimbraDomainName eq,sub
olcDbIndex: mail pres,eq,sub
olcDbIndex: zimbraCalResSite eq,sub
olcDbIndex: givenName pres,eq,sub
olcDbIndex: displayName pres,eq,sub
olcDbIndex: sn pres,eq,sub
olcDbIndex: zimbraCalResRoom eq,sub
olcDbIndex: zimbraCalResCapacity eq
olcDbIndex: zimbraCalResBuilding eq,sub
olcDbIndex: zimbraCalResFloor eq,sub
olcDbIndex: zimbraDomainAliasTargetID eq
olcDbIndex: zimbraUCServiceId eq
olcDbIndex: DKIMIdentity eq
olcDbIndex: DKIMSelector eq
olcDbIndex: uidNumber eq
olcDbIndex: gidNumber eq
olcDbIndex: memberUid eq
structuralObjectClass: olcMdbConfig
entryUUID: 3b19a066-8133-1036-9c54-457b17c0eeaa
creatorsName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
createTimestamp: 20170207034245Z
olcSyncrepl: {0}rid=919 provider=ldap://master.example.com type=refresh
 AndPersist retry="5 5 300 +" searchbase="" attrs="*,+" bindmethod=simple bi
 nddn="uid=zimbra,cn=admins,cn=zimbra" credentials=secret
olcDbMaxSize: 85899345920
olcRootDN: cn=admin,cn=config
entryCSN: 20170207042001.780092Z#000000#000#000000
modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
modifyTimestamp: 20170207042001Z

I have succesfully replicated all the data from Zimbra to the new LDAP server. But I can't bind to the replicated server using zimbra user. e.g. uid=desdulianto,ou=people,dc=example,dc=com.

ldapwhoami -vvv -x -h localhost -D uid=desdulianto,ou=people,dc=example,dc=com -W
ldap_initialize( ldap://localhost )
Enter LDAP Password: 
ldap_bind: Invalid credentials (49)

But I can verify the password using Apache Directory Studio (cannot bind though).

Is there any mistake or other configuration that I need to add?

Thanks.


Solution

  • I have found the problem, I forget to add olcAccess configuration to the database. So I just modify the database configuration and add the olcAccess config to the replicated database.