Connecting to Zimbra LDAP

Hi,

I’m new here :slight_smile:
This is my first full install of Rocketchat but I had to managed an old one before (it crash and I could not make it alive again so I decide to install a new one)

Description

I managed to install all stack on my server. Rocket is runnning well with local user but I need to connect and auth on Zimbra LDAP.

I managed to set up connexion to LDAP, test is successful. But when I try synchronize user, it does nothing.

If i try to connected, it refuse connexion (either user or password is not correct)

Thanks for helping
Jerome

Server Setup Information

  • Version of Rocket.Chat Server: 3.0.9
  • Operating System: Ubuntu 18.04
  • Deployment Method: tar+npm
  • Number of Running Instances: 1
  • DB Replicaset Oplog: 1
  • NodeJS Version: 12.14
  • MongoDB Version: 4.0.17
  • Proxy:
  • Firewalls involved: none

Any additional Information

For sync/import, here’s are the variables :
LDAP_Username_Field : uid
LDAP_Unique_Identifier_Field : mail,uid
LDAP_Sync_User_Data on
LDAP_Sync_User_Data_FieldMap : {“cn”:“name”, “mail”:“email”}

When I try to sync, here’s what I have in log :
Apr 1 01:16:03 web1 rocketchat[799]: ldap_sync_now {
Apr 1 01:16:03 web1 rocketchat[799]: id: ‘jRnATekWsjirAfXSN’,
Apr 1 01:16:03 web1 rocketchat[799]: clientAddress: ‘90.52.109.115’,
Apr 1 01:16:03 web1 rocketchat[799]: httpHeaders: {
Apr 1 01:16:03 web1 rocketchat[799]: referer: ‘site url’,
Apr 1 01:16:03 web1 rocketchat[799]: ‘x-forwarded-for’: ‘90.52.109.115’,
Apr 1 01:16:03 web1 rocketchat[799]: ‘x-forwarded-host’: ‘zzzz.xxxx.fr’,
Apr 1 01:16:03 web1 rocketchat[799]: host: ‘zzzz.xxxx.fr’,
Apr 1 01:16:03 web1 rocketchat[799]: ‘user-agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36’,
Apr 1 01:16:03 web1 rocketchat[799]: ‘accept-language’: ‘fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7’
Apr 1 01:16:03 web1 rocketchat[799]: },
Apr 1 01:16:03 web1 rocketchat[799]: userId: ‘LXxpdPRJ3EuwxyfaP’
Apr 1 01:16:03 web1 rocketchat[799]: }
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 Meteor ➔ method ldap_sync_now -> userId: LXxpdPRJ3EuwxyfaP, arguments:
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Connection.info Init setup
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Connection.info Connecting ldap://mail.xxxx.fr:389
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Connection.debug connectionOptions {
Apr 1 01:16:03 web1 rocketchat[799]: url: ‘ldap://mail.xxxx.fr:389’,
Apr 1 01:16:03 web1 rocketchat[799]: timeout: 60000,
Apr 1 01:16:03 web1 rocketchat[799]: connectTimeout: 2500,
Apr 1 01:16:03 web1 rocketchat[799]: idleTimeout: 1000,
Apr 1 01:16:03 web1 rocketchat[799]: reconnect: true,
Apr 1 01:16:03 web1 rocketchat[799]: log: Logger {
Apr 1 01:16:03 web1 rocketchat[799]: _events: [Object: null prototype] {},
Apr 1 01:16:03 web1 rocketchat[799]: _eventsCount: 0,
Apr 1 01:16:03 web1 rocketchat[799]: _maxListeners: undefined,
Apr 1 01:16:03 web1 rocketchat[799]: _level: 30,
Apr 1 01:16:03 web1 rocketchat[799]: streams: [ [Object] ],
Apr 1 01:16:03 web1 rocketchat[799]: serializers: null,
Apr 1 01:16:03 web1 rocketchat[799]: src: false,
Apr 1 01:16:03 web1 rocketchat[799]: fields: { name: ‘ldapjs’, component: ‘client’, hostname: ‘web1’, pid: 799 }
Apr 1 01:16:03 web1 rocketchat[799]: }
Apr 1 01:16:03 web1 rocketchat[799]: }
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Connection.info LDAP connected
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Bind.info Binding UserDN uid=zimbra,cn=admins,cn=zimbra
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Search.info Searching user *
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Search.debug searchOptions {
Apr 1 01:16:03 web1 rocketchat[799]: filter: ‘(&(objectclass=)(sAMAccountName=))’,
Apr 1 01:16:03 web1 rocketchat[799]: scope: ‘sub’,
Apr 1 01:16:03 web1 rocketchat[799]: sizeLimit: 1000,
Apr 1 01:16:03 web1 rocketchat[799]: paged: { pageSize: 250, pagePause: true }
Apr 1 01:16:03 web1 rocketchat[799]: }
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Search.debug BaseDN
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAP ➔ Search.info Final Page
Apr 1 01:16:03 web1 rocketchat[799]: server.js:204 LDAPSync ➔ info Import finished. Users imported: 0
Apr 1 01:16:04 web1 rocketchat[799]: server.js:204 LDAP ➔ Search.info Idle
Apr 1 01:16:04 web1 rocketchat[799]: server.js:204 LDAP ➔ Connection.info Disconecting

It look like there is a filter set with sAMAccountName but I don’t know where

When I try to connect in Rocket with a Zimbra user, I have this in the log
It looks like it’s not using credentials

Apr 1 01:05:43 web1 rocketchat[799]: server.js:204 LDAPHandler ➔ error Error: User not Found
Apr 1 01:05:43 web1 rocketchat[799]: at MethodInvocation. (app/ldap/server/loginHandler.js:60:10)
Apr 1 01:05:43 web1 rocketchat[799]: at packages/accounts-base/accounts_server.js:460:31
Apr 1 01:05:43 web1 rocketchat[799]: at tryLoginMethod (packages/accounts-base/accounts_server.js:1289:14)
Apr 1 01:05:43 web1 rocketchat[799]: at AccountsServer._runLoginHandlers (packages/accounts-base/accounts_server.js:458:22)
Apr 1 01:05:43 web1 rocketchat[799]: at AccountsServer.Accounts._runLoginHandlers (app/lib/server/lib/loginErrorMessageOverride.js:7:35)
Apr 1 01:05:43 web1 rocketchat[799]: at MethodInvocation.methods.login (packages/accounts-base/accounts_server.js:518:31)
Apr 1 01:05:43 web1 rocketchat[799]: at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
Apr 1 01:05:43 web1 rocketchat[799]: at packages/ddp-server/livedata_server.js:719:19
Apr 1 01:05:43 web1 rocketchat[799]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Apr 1 01:05:43 web1 rocketchat[799]: at packages/ddp-server/livedata_server.js:717:46
Apr 1 01:05:43 web1 rocketchat[799]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Apr 1 01:05:43 web1 rocketchat[799]: at packages/ddp-server/livedata_server.js:715:46
Apr 1 01:05:43 web1 rocketchat[799]: at new Promise ()
Apr 1 01:05:43 web1 rocketchat[799]: at Session.method (packages/ddp-server/livedata_server.js:689:23)
Apr 1 01:05:43 web1 rocketchat[799]: at packages/ddp-server/livedata_server.js:559:43