I’m still at the point I cannot understand what is going wrong with my LDAP integration.
I started a fresh installation of zammad, so all clean data.
I did the configuration of the LDAP source, that completed with (apparently) detecting users and groups, but then the integration is deactivated.
No recent logs are shown in the UI.
Digging into the database, I can provide you the following:
$ sudo -u postgres psql -c 'select name, started_at, finished_at, result from import_jobs;' -x zammad | cat -
-[ RECORD 1 ]-----------------------------------------------------------------------------
name | Import::Ldap
started_at | 2024-07-08 11:14:32.094
finished_at | 2024-07-08 11:22:32.871
result | --- +
| skipped: 0 +
| created: 66183 +
| updated: 1 +
| unchanged: 0 +
| failed: 0 +
| deactivated: 0 +
| sum: 66184 +
| total: 66184 +
| role_ids: +
| 3: +
| skipped: 0 +
| created: 66154 +
| updated: 1 +
| unchanged: 0 +
| failed: 0 +
| deactivated: 0 +
| sum: 66155 +
| total: 0 +
| 2: +
| skipped: 0 +
| created: 29 +
| updated: 0 +
| unchanged: 0 +
| failed: 0 +
| deactivated: 0 +
| sum: 29 +
| total: 0 +
|
-[ RECORD 2 ]-----------------------------------------------------------------------------
name | Import::Ldap
started_at | 2024-07-08 11:23:28.952
finished_at | 2024-07-08 11:23:28.956
result | --- +
| info: Sync cancelled. Ldap integration deactivated. Activate via the switch.+
|
-[ RECORD 3 ]-----------------------------------------------------------------------------
name | Import::Ldap
started_at | 2024-07-08 11:32:40.791
finished_at | 2024-07-08 11:32:40.798
result | --- +
| info: Sync cancelled. Ldap integration deactivated. Activate via the switch.+
|
-[ RECORD 4 ]-----------------------------------------------------------------------------
name | Import::Ldap
started_at | 2024-07-08 11:33:37.651
finished_at | 2024-07-08 11:33:37.656
result | --- +
| info: Sync cancelled. Ldap integration deactivated. Activate via the switch.+
|
-[ RECORD 5 ]-----------------------------------------------------------------------------
name | Import::Ldap
started_at | 2024-07-08 11:34:02.657
finished_at | 2024-07-08 11:34:02.663
result | --- +
| info: Sync cancelled. Ldap integration deactivated. Activate via the switch.+
|
-[ RECORD 6 ]-----------------------------------------------------------------------------
name | Import::Ldap
started_at | 2024-07-08 11:34:50.099
finished_at | 2024-07-08 11:34:50.109
result | --- +
| info: Sync cancelled. Ldap integration deactivated. Activate via the switch.+
|
The table users
contains 3 rows, in the UI there is nothing showing “imported” users and groups. I don’t have any particular log entry that I can see in the logs, neither errors:
$ sudo tail -f /var/log/zammad/production.log | grep -i error
shows nothing for all the LDAP integration phase, even when clicking on the sync-now button.
I’ve then tried to create the following Ruby file:
$ sudo cat /opt/zammad/ldap.rb
require 'mixin/rails_logger'
module Mixin
module RailsLogger
def self.logger
@logger ||= Logger.new(log_to).tap do |logger|
logger.level = :debug
end
end
def self.log_to
# STDOUT
'/var/log/zammad/ldap.log'
end
end
end
print( "Starting" )
ImportJob.create(name: 'Import::Ldap').start
print( "endingg" )
Assuming I’m not a ruby developer, I launched it as:
$ sudo -u zammad zammad run rails r ldap.rb
Startingendingg
Nothing appears, and there is no such a file like ldap.log
.
I really need some advice because I’m stuck on this.