Univention Bugzilla – Bug 48291
AD-Connector rejects to sync object to_ucs probably due to adopted AD schema
Last modified: 2021-05-14 16:33:55 CEST
I came across a very similiar case, but the fix didn't help. The first visible Traceback was this one, because Kopano was installed (UCS in AD-Member-Mode): 06.12.2018 14:15:56,94 LDAP (ERROR ): Unknown Exception during sync_to_ucs 06.12.2018 14:15:56,94 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1361, in sync_to_ucs result = self.modify_in_ucs(property_type, object, module, position) File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1198, in modify_in_ucs return ucs_object.modify() and self.__modify_custom_attributes(property_type, object, ucs_object, module, position) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1669, in modify return super(object, self).modify(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 583, in modify dn = self._modify(modify_childs, ignore_license=ignore_license, response=response) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 1209, in _modify self.call_udm_property_hook('hook_ldap_pre_modify', self) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 977, in call_udm_property_hook func(module) File "/usr/lib/pymodules/python2.7/univention/admin/hooks.d/kopano4ucsRole.py", line 129, in hook_ldap_pre_modify raise univention.admin.uexceptions.valueError, _("Kopano users must have a primary e-mail address specified.") valueError: Kopano users must have a primary e-mail address specified. After commenting out the Kopano-Hook, the Traceback was the same as in the original Bug: 05.12.2018 22:17:17,592 LDAP (ERROR ): Unknown Exception during sync_to_ucs 05.12.2018 22:17:17,592 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1368, in sync_to_ucs f(self, property_type, object) File "/usr/lib/pymodules/python2.7/univention/connector/ad/password.py", line 312, in password_sync_kinit object = connector._object_mapping(key, ucs_object, 'ucs') File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1692, in _object_mapping object_out['attributes'][self.property[key].post_attributes[attr_key].con_attribute] = self.property[key].post_attributes[attr_key].mapping[0](self, key, object) File "/usr/lib/pymodules/python2.7/univention/connector/ad/proxyAddresses.py", line 70, in to_proxyAddresses mailPrimaryAddress = object['attributes'].get('mailPrimaryAddress', [None])[0] IndexError: list index out of range Further testing showed: - If the AD user has only the attribute "mail", this is written to "mailPrimaryAddress" without problems. This alone is remarkable, because of http://errata.software-univention.de/ucs/4.1/386.html I would have expected that "mail" is not considered at all. Is this only the case if univention-ad-connector-exchange is installed additionally to univention-ad-connector? - If the AD user has additional entries in "proxyAdresses" starting with "SIP:", the Traceback above occurs. Seems as if we can only handle entries starting with "SMTP:" or "smtp:"? +++ This bug was initially created as a clone of Bug #46751 +++ When syncing a MS/AD to a UCS/LDAP some objects are rejected with the following TraceBack: ---------------------------------------- 26.03.2018 06:25:14,6 LDAP (ERROR ): Unknown Exception during sync_to_ucs 26.03.2018 06:25:14,10 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1367, in sync_to_ucs f(self, property_type, object) File "/usr/lib/pymodules/python2.7/univention/connector/ad/password.py", line 311, in password_sync_kinit object = connector._object_mapping(key, ucs_object, 'ucs') File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1691, in _object_mapping object_out['attributes'][self.property[key].post_attributes[attr_key].con_attribute] = self.property[key].post_attributes[attr_key].mapping[0](self, key, object) File "/usr/lib/pymodules/python2.7/univention/connector/ad/proxyAddresses.py", line 70, in to_proxyAddresses mailPrimaryAddress = object['attributes'].get('mailPrimaryAddress', [None])[0] IndexError: list index out of range ---------------------------------------- As far as I understood the scenario, there is Kerio Mail installed on the MS/AD system and should be migrated to a UCS/Kopano - which obviously seems to be already setup. There is also the MS/AD object at hand.
This issue has been filed against UCS 4.3. UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.