[solved] Kopano (kopano4ucs-udm) "kopanoAccount" fehlt im Ldap fuer neue Benutzer

Hallo,
Wir haben hier ein Kopano (frueher Zarafa) installiert. Beim Anlegen neuer Nutzer ist mir aufgefallen das diese jetzt nicht mehr im Kopano angelegt werden. Das ganze Fehlerbild ist sehr aehnlich zu

kopano4ucs-udm ist in Version 1.5.13 auf unserem master installiert.

Fuer einen schon laenger bestehenden user sieht das ldap so aus:

# univention-ldapsearch -LLL uid=$alter_user | grep kopano
kopanoAdmin: 0
kopanoSharedStoreOnly: 0
kopanoAccount: 1
kopano4ucsRole: user
objectClass: kopano-user

Fuer neu angelegte Nutzer:

# univention-ldapsearch -LLL uid=$neuer_user | grep kopano
objectClass: kopano-user
kopano4ucsRole: user

Im log finde ich nix (oder ich suche im falschem Log).

Wie kann ich das weiter debuggen? Scheinbar wird der hook kopano4ucsRole.py gar nicht ausgefuehrt?

Etwas ratlose Gruesse Lutz

Hallo @lutz.willek,

kannst du einmal die Informationen aus https://wiki.z-hub.io/display/K4U/Debugging+Kopano+on+Univention posten?

Klar. Der Server mit installiertem Kopano ist ein DC Slave:

# univention-app info
UCS: 4.4-3 errata438
Installed: kopano-core=8.7.1.0-1 kopano-webapp=3.5.5.2276 letsencrypt=1.2.2-8 z-push-kopano=2.4.5
Upgradable:

Folgendes ist installiert:

# dpkg -l | grep -w 'kopano4ucs\|kopano-server-packages\|kopano-webapp\|z-push-kopano'
ii  kopano-server-packages                              8.7.1.0-0+9.1                                                       all          Metapackage to install the entire Kopano Core stack
ii  kopano-webapp                                       3.5.5.2276+93.1                                                     all          New and improved WebApp for Kopano
ii  kopano-webapp-plugin-desktopnotifications           2.0.2.23+28.5                                                       all          Kopano WebApp Desktop notifications plugin
ii  kopano-webapp-plugin-filepreviewer                  2.1.0.26+20.6                                                       all          Kopano File previewer plugin
ii  kopano-webapp-plugin-files                          2.1.5.305+101.2                                                     all          Adds Files functionality to Kopano enabling access to WebDAV and other files backends.
ii  kopano-webapp-plugin-filesbackend-owncloud          2.1.0.87+42.5                                                       all          Adds Owncloud specific functionality to Kopano Files plugin.
ii  kopano-webapp-plugin-filesbackend-smb               2.1.0.50+31.5                                                       all          Adds Samba specific functionality to Kopano Files plugin.
ii  kopano-webapp-plugin-folderwidgets                  3.5.5.2276+93.1                                                     all          Kopano WebApp folder widgets plugin
ii  kopano-webapp-plugin-mdm                            2.1.1.109+38.3                                                      all          Kopano WebApp MDM plugin
ii  kopano-webapp-plugin-smime                          2.2.1.223+22.6                                                      all          Kopano WebApp S/MIME plugin
ii  kopano-webapp-plugin-spell                          2.0.0.19+37.5                                                       all          Kopano WebApp Spellchecker plugin
ii  kopano-webapp-plugin-spell-de-de                    2.0.0.3+34.4                                                        all          Kopano WebApp Spellchecker German dictionary plugin
ii  kopano-webapp-plugin-spell-en                       2.0.0.1+34.4                                                        all          Kopano WebApp Spellchecker English dictionary plugin
ii  kopano-webapp-plugin-spell-nl                       2.0.0.1+35.4                                                        all          Kopano WebApp Spellchecker Dutch dictionary plugin
ii  kopano-webapp-plugin-titlecounter                   3.5.5.2276+93.1                                                     all          Kopano WebApp Titlecounter plugin
ii  kopano-webapp-plugin-webappmanual                   3.5.5.2276+93.1                                                     all          Kopano WebApp Manual plugin
ii  kopano4ucs                                          1.6.2                                                               all          Kopano4ucs integration package for Univention Corporate Server
ii  kopano4ucs-app                                      1.6.2                                                               all          Package for UCS app specific logic
ii  kopano4ucs-lib                                      1.6.2                                                               all          Library package for common Kopano4ucs functions
ii  kopano4ucs-migrate-zarafa                           1.2.11                                                              all
ii  kopano4ucs-schema                                   1.6.2                                                               all          LDAP schema for the Kopano4ucs integration
ii  kopano4ucs-udm                                      1.6.2                                                               all          UDM extensions for the Kopano4ucs integration
ii  kopano4ucs-webapp                                   1.5.33                                                              all          Kopano4ucs kopano-webapp integration package for Univention Corporate Server
ii  kopano4ucs-z-push                                   1.5.33                                                              all          Meta package for Z-Push installation
ii  z-push-kopano                                       2.4.5+0-0                                                           all          Z-Push for Kopano
ii  z-push-kopano-gabsync                               2.4.5+0-0                                                           all          GAB sync for Kopano

Die config (manches habe ich hier entfernt)

# ucr dump | grep kopano/cfg
kopano/cfg/admin/default_store_locale: de_DE.UTF-8
kopano/cfg/dagent/lmtp_listen: 127.0.0.1:2003
kopano/cfg/gateway/disable_plaintext_auth: yes
kopano/cfg/gateway/imaps_listen: *:993
kopano/cfg/gateway/pop3s_listen: *:995
...
kopano/cfg/ldap/ldap_authentication_method: bind
kopano/cfg/ldap/ldap_bind_passwd: @&@/etc/kopano-ldap.secret@&@
kopano/cfg/ldap/ldap_bind_user: @%@ldap/hostdn@%@
kopano/cfg/ldap/ldap_emailaddress_attribute: mailPrimaryAddress
kopano/cfg/ldap/ldap_emailaliases_attribute: mailAlternativeAddress
kopano/cfg/ldap/ldap_group_search_filter: (&(kopanoAccount=1)(objectClass=kopano-group))
kopano/cfg/ldap/ldap_groupmembers_attribute: uniqueMember
kopano/cfg/ldap/ldap_groupmembers_attribute_type: dn
kopano/cfg/ldap/ldap_groupmembers_relation_attribute:
kopano/cfg/ldap/ldap_nonactive_attribute: kopanoSharedStoreOnly
kopano/cfg/ldap/ldap_quota_multiplier: 1048576
kopano/cfg/ldap/ldap_search_base: @%@ldap/base@%@
kopano/cfg/ldap/ldap_sendas_relation_attribute: uidNumber
kopano/cfg/ldap/ldap_uri: ldap://@%@ldap/server/name@%@:@%@ldap/server/port@%@/
kopano/cfg/ldap/ldap_user_search_filter: (kopanoAccount=1)
kopano/cfg/ldap/ldap_user_type_attribute_value: kopano-user
kopano/cfg/ldap/ldap_user_unique_attribute: entryUUID
...
kopano/cfg/server/cache_userdetails_lifetime: 5
...
kopano/cfg/server/createuser_script: /usr/lib/kopano/userscripts/createuser
...
kopano/cfg/server/user_plugin: ldap
kopano/cfg/server/user_safe_mode: no

Auf dem master:

# apt-cache policy kopano4ucs-udm
kopano4ucs-udm:
  Installed: 1.5.13
  Candidate: 1.5.13
  Version table:
 *** 1.5.13 100
        100 /var/lib/dpkg/status

Wenn ein neuer User “Demo Damoklin” mit Kopano Rolle “Kopano-Benutzer” angelegt wird, sehe ich im Log des masters folgendes:

# tail -f /var/log/univention/*log

==> /var/log/univention/listener.log <==
09.02.20 19:33:48.196  LDAP        ( PROCESS ) : connecting to ldap://verwaltung.belug.lan:7389
09.02.20 19:33:48.202  LISTENER    ( PROCESS ) : updating 'cn=demo,cn=uid,cn=temporary,cn=univention,dc=belug,dc=de' command a
09.02.20 19:33:48.223  LISTENER    ( PROCESS ) : updating 'cn=demo.damoklin@belug.de,cn=mailPrimaryAddress,cn=temporary,cn=univention,dc=belug,dc=de' command a
09.02.20 19:33:48.237  LISTENER    ( PROCESS ) : updating 'cn=2224,cn=uidNumber,cn=temporary,cn=univention,dc=belug,dc=de' command a
09.02.20 19:33:48.243  LISTENER    ( PROCESS ) : updating 'cn=2224,cn=gidNumber,cn=temporary,cn=univention,dc=belug,dc=de' command a
09.02.20 19:33:48.268  LISTENER    ( PROCESS ) : updating 'cn=2224,cn=gidNumber,cn=temporary,cn=univention,dc=belug,dc=de' command d
09.02.20 19:33:48.320  LISTENER    ( PROCESS ) : updating 'cn=S-1-5-21-481563731-1067038031-3518172338-5448,cn=sid,cn=temporary,cn=univention,dc=belug,dc=de' command a
09.02.20 19:33:48.346  LISTENER    ( PROCESS ) : updating 'uid=demo,cn=users,dc=belug,dc=de' command a
09.02.20 19:33:48.364  LISTENER    ( PROCESS ) : updating 'cn=uidNumber,cn=temporary,cn=univention,dc=belug,dc=de' command m
09.02.20 19:33:48.386  LISTENER    ( PROCESS ) : updating 'cn=2224,cn=uidNumber,cn=temporary,cn=univention,dc=belug,dc=de' command d
09.02.20 19:33:48.398  LISTENER    ( PROCESS ) : updating 'cn=demo.damoklin@belug.de,cn=mailPrimaryAddress,cn=temporary,cn=univention,dc=belug,dc=de' command d
09.02.20 19:33:48.428  LISTENER    ( PROCESS ) : updating 'cn=demo,cn=uid,cn=temporary,cn=univention,dc=belug,dc=de' command d
09.02.20 19:33:48.453  LISTENER    ( PROCESS ) : updating 'cn=***removed**,cn=groups,dc=belug,dc=de' command m
09.02.20 19:33:48.493  LISTENER    ( PROCESS ) : updating 'cn=***removed**,cn=groups,dc=belug,dc=de' command m

Dann bitte auch noch einmal dpkg -l | grep -w 'kopano4ucs\|kopano-server-packages\|kopano-webapp\|z-push-kopano' auf dem Master ausfĂĽhren.

Generell ist es merkwürdig dass die Paket Versionen auf dem Master und Slave unterschiedlich sein. Es gab da eine Option für univention-install oder univention-app um nur Pakete auf dem Master zu verarbeiten. Eventuell könnte das hier helfen, finde die Option aber auf die Schnelle nicht.

1 Like

Das sollte mit folgendem Befehl auf dem DC Master gehen: univention-app install --only-master-packages <app>=<version>

Wenn schon die neueste Kopano App Version in der Domäne installiert ist, reicht univention-app install --only-master-packages kopano-core

2 Likes

Das war es, das Thema ist geloest.

Problem: Unterschiedliche Versionen waren installiert. Ich haette jetzt (wie auf dem Slave) Version 1.6.2 erwartet - den Versionsunterschied hatte ich gestern gar nicht bemerkt. Danke fuer den Hinweis Felix!

Auf beidem, Master und Backup, schaute es folgendermassen aus:

# dpkg -l | grep -w 'kopano4ucs\|kopano-server-packages\|kopano-webapp\|z-push-kopano'
ii  kopano4ucs-lib                                      1.3.10                                                              all          Library package for common Kopano4ucs functions
ii  kopano4ucs-schema                                   1.5.13                                                              all          LDAP schema for the Kopano4ucs integration
ii  kopano4ucs-udm                                      1.5.13                                                              all          UDM extensions for the Kopano4ucs integration

Ein univention-upgrade zeigte mir auch auf beiden Systemen nichts an was zu updaten waere.

Ich habe dann auf dem master (Danke Erik) univention-app install --only-master-packages kopano-core ausgefuehrt, gefolgt von einem apt-get remove --purge kopano4ucs-lib. Das Endergebnis ist wie folgt:

# dpkg -l | grep -w 'kopano4ucs\|kopano-server-packages\|kopano-webapp\|z-push-kopano'
ii  kopano4ucs-schema                                   1.6.2                                                               all          LDAP schema for the Kopano4ucs integration
ii  kopano4ucs-udm                                      1.6.2                                                               all          UDM extensions for the Kopano4ucs integration

Nachdem der Nutzer “Demo Damoklin” mit Kopano Rolle “Kopano-Benutzer” angelegt wurde zeigt mir das Ldap nun wieder folgendes an:

# univention-ldapsearch -LLL uid=demo | grep kopano
kopanoAccount: 1
objectClass: kopano-user
kopanoAdmin: 0
kopano4ucsRole: user
kopanoSharedStoreOnly: 0

Also alles gut! :smiley:

Die Benutzer die zwischenzeitlich angelegt wurden haben natuerlich jetzt noch keinen Store bekommen und sehen im Ldap noch folgendermassen aus:

# univention-ldapsearch -LLL uid=$zwischendurch_angelegter_benutzer | grep kopano
objectClass: kopano-user
kopano4ucsRole: user

Es ist hier vollkommen ausreichend im UDM die Kopano-Rolle auf “keine” und dann wieder zurueck auf “Kopano-Benutzer” zu stellen um dies zu beheben.

Eine Liste der potentiell betroffenen Benutzer (also ohne dem entsprechenden Attribut im Ldap) bekommt man mit folgendem Befehl angezeigt:

# univention-ldapsearch -LLL '(&(objectClass=person)(mailPrimaryAddress=*)(!(kopanoAccount=*)))' uid

Damit im V-Fall auch der DC Backup funktioniert wie erwartet wurde zum Schluss dort noch mit den alten Versionen aufgeraeumt, also univention-app install --only-master-packages kopano-core gefolgt von einem apt-get remove --purge kopano4ucs-lib ausgefuehrt.

Gruss Lutz

2 Likes
Mastodon