Changing name of windows computer, casues error in ldap

to standardize the computer names we were gonig to rename some computers that did nto comply.

The system was migrated from a 2008 win server and appears to have been running fine for months.
No problem adding new computers/ devices /users etc.

after rename we got errors thrown.
You can see at the top the rename. then some error about “MicrosoftDNS”.

17.02.2022 16:25:56.377 LDAP        (PROCESS): sync AD > UCS: [windowscomputer] [    modify] 'cn=901-pengwang,cn=computers,dc=bob01,dc=org,dc=mydomain,dc=com'
17.02.2022 16:25:56.388 LDAP        (PROCESS): con_check_rename: Renaming client from b'901-PENGWANG$' to b'GP-0901$'
17.02.22 16:25:56.394  LDAP        ( WARN    ) : rename cn=GP-0901
17.02.22 16:25:56.684  LDAP        ( WARN    ) : rename relativeDomainName=GP-0901
17.02.2022 16:26:02.770 LDAP        (PROCESS): sync UCS > AD: [windowscomputer] [      move] 'cn=GP-0901,cn=computers,DC=bob01,DC=org,DC=mydomain,DC=com'
17.02.2022 16:26:02.790 LDAP        (WARNING): password_sync_ucs_to_s4: userPrincipalName != krb5Principal: b'host/901-PENGWANG.bob01.org.mydomain.com@bob01.ORG.mydomain.COM' != b'host/GP-0901.bob01.org.mydomain.com@bob01.ORG.mydomain.COM'
17.02.2022 16:26:02.800 LDAP        (PROCESS): sync UCS > AD: [windowscomputer] [    modify] 'cn=gp-0901,cn=computers,DC=bob01,DC=org,DC=mydomain,DC=com'
17.02.2022 16:26:02.813 LDAP        (PROCESS): sync UCS > AD: [         group] [    modify] 'cn=domain computers,cn=users,DC=bob01,DC=org,DC=mydomain,DC=com'
17.02.2022 16:26:03.072 LDAP        (PROCESS): sync UCS > AD: [         group] [    modify] 'cn=domain computers,cn=users,DC=bob01,DC=org,DC=mydomain,DC=com'
17.02.2022 16:26:03.121 LDAP        (WARNING): sync failed, saved as rejected 
        /var/lib/univention-connector/s4/1645086356.690217
17.02.2022 16:26:03.123 LDAP        (WARNING): Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 1032, in poll_ucs
    sync_successfull = self.__sync_file_from_ucs(filename, traceback_level=traceback_level)
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 820, in __sync_file_from_ucs
    mapped_object = self._object_mapping(key, object, 'ucs')
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 1742, in _object_mapping
    return self._object_mapping_ucs(key, old_object)
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 1764, in _object_mapping_ucs
    object = function(self, object, dn_mapping_stored, isUCSobject=True)
  File "/usr/lib/python3/dist-packages/univention/s4connector/s4/dns.py", line 259, in dns_dn_mapping
    show_deleted=False)
  File "/usr/lib/python3/dist-packages/univention/s4connector/s4/__init__.py", line 884, in __search_s4
    rtype, rdata, rmsgid, serverctrls = self.lo_s4.lo.result3(msgid)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 749, in result3
    resp_ctrl_classes=resp_ctrl_classes
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 756, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call
    reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise
    raise exc_value
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call
    result = func(*args,**kwargs)
ldap.NO_SUCH_OBJECT: {'desc': 'No such object', 'info': '00002030: No such Base DN: DC=bob01.org.mydomain.com,CN=MicrosoftDNS,CN=System,DC=bob01,DC=org,DC=mydomain,DC=com'}

17.02.2022 16:26:03.125 LDAP        (WARNING): sync failed, saved as rejected 
        /var/lib/univention-connector/s4/1645086356.690902
17.02.2022 16:26:03.125 LDAP        (WARNING): Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 1032, in poll_ucs
    sync_successfull = self.__sync_file_from_ucs(filename, traceback_level=traceback_level)
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 820, in __sync_file_from_ucs
    mapped_object = self._object_mapping(key, object, 'ucs')
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 1742, in _object_mapping
    return self._object_mapping_ucs(key, old_object)
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 1764, in _object_mapping_ucs
    object = function(self, object, dn_mapping_stored, isUCSobject=True)
  File "/usr/lib/python3/dist-packages/univention/s4connector/s4/dns.py", line 259, in dns_dn_mapping
    show_deleted=False)
  File "/usr/lib/python3/dist-packages/univention/s4connector/s4/__init__.py", line 884, in __search_s4
    rtype, rdata, rmsgid, serverctrls = self.lo_s4.lo.result3(msgid)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 749, in result3
    resp_ctrl_classes=resp_ctrl_classes
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 756, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call
    reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise
    raise exc_value
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call
    result = func(*args,**kwargs)
ldap.NO_SUCH_OBJECT: {'desc': 'No such object', 'info': '00002030: No such Base DN: DC=bob01.org.mydomain.com,CN=MicrosoftDNS,CN=System,DC=bob01,DC=org,DC=mydomain,DC=com'}

17.02.2022 16:26:03.126 LDAP        (PROCESS): sync UCS > AD: [           dns] [    modify] 'dc=@,dc=bob01.org.mydomain.com,cn=microsoftdns,dc=domaindnszones,DC=bob01,DC=org,DC=mydomain,DC=com'
17.02.2022 16:26:04.157 LDAP        (PROCESS): sync AD > UCS: [windowscomputer] [    modify] 'cn=gp-0901,cn=computers,dc=bob01,dc=org,dc=mydomain,dc=com'
17.02.2022 16:26:55.425 LDAP        (PROCESS): sync UCS > AD: Resync rejected file: /var/lib/univention-connector/s4/1645086356.690217
17.02.2022 16:26:55.474 LDAP        (WARNING): sync failed, saved as rejected 

A comparison of the S4 connector

root@ad01:/var/log/univention# univention-s4connector-list-rejected

UCS rejected

    1:   UCS DN: relativeDomainName=GP-0901,zoneName=bob01.org.mydomain.com,cn=dns,dc=bob01,dc=org,dc=mydomain,dc=com
          S4 DN: <not found>
         Filename: /var/lib/univention-connector/s4/1645086356.690217

    2:   UCS DN: relativeDomainName=GP-0901,zoneName=bob01.org.mydomain.com,cn=dns,dc=bob01,dc=org,dc=mydomain,dc=com
          S4 DN: <not found>
         Filename: /var/lib/univention-connector/s4/1645086356.690902


S4 rejected

	last synced USN: 78565

Any solution or ideas as to what might be wrong ?

Still seeing it even after all the updates since Feb 2022

I worked my way thru:

i get the following:
univention-s4search -b CN=MicrosoftDNS,CN=System,$(ucr get samba4/ldap/base) --cross-ncs |grep dn: |grep -vi root
dn: CN=MicrosoftDNS,CN=System,DC=zx01,DC=org,DC=mydomain,DC=com

(which indicates it is ok)
BUT!!!

ucr get connector/s4/mapping/dns/position
legacy

could it be all my errors are caused because the s4 connector is still on “legacy”?

and should i progress to : STEP 3 ?

Mastodon