Problem: Kopano user missing attribute "kopanoAccount" since upgrade UCS

Problem:

Since the upgrade from the DC-Master to UCS 5.0-x and the DC-Slave is still on 4.4-x, my new created users don´t could login into Kopano. Because the new users are missing the attribute kopanoAccount

The output from the new created user looks like this:
univention-ldapsearch uid=NewUser | grep kopano

kopano4ucsRole: none
kopanoResourceType: none

Solution:

On the DC-Slave where you installed the Kopano system, you have to do the following run scripts, to trigger the kopano4ucsRole.py that will add the missing attribute

univention-run-join-scripts --force --run-scripts 70kopano4ucs-udm.inst

Hint
You need and User with Domain Admins rights like the Administrator, to run the script successfully!

At least check if it works with an univention-ldapsearch again

univention-ldapsearch uid=NewUser| grep kopano

kopano4ucsRole: user
kopanoResourceType: none
kopanoAccount: 1
kopanoAdmin: 0
kopanoSharedStoreOnly: 0
objectClass: kopano-user

Solution 5.2:

In 5.2 on the primary, the kopano hooks seem not to work anymore. So the kopanoAccount is not set automatically anymore.
For the transition period to a new solution you can add the attributes to new accounts via ldapmodify:

root@ucs-1:~/univention-support# ldapmodify -x -D "cn=admin,$(ucr get ldap/base)" -y /etc/ldap.secret <<EOR
> dn: uid=simpson,cn=Verwaltung,cn=users,dc=schein,dc=ig
> changetype: modify
> add: kopanoAccount
> kopanoAccount: 1
> EOR
modifying entry "uid=simpson,cn=Verwaltung,cn=users,dc=schein,dc=ig"