Univention Bugzilla – Bug 48666
KeyError in remove-old-homedirs listener
Last modified: 2023-06-12 15:39:52 CEST
The listener "remove-old-homedirs" from the "ucs-school-old-homedirs" package crashes with KeyError: 'uid' when a group is deleted. Its LDAP filter is '(objectClass=ucsschoolType)'. OC ucsschoolType is inherited by OCs ucsschoolAdministratorGroup and ucsschoolImportGroup. So this happens: 01.08.18 11:13:56.169 LISTENER ( PROCESS ) : updating 'cn=admins-tx71qen12zw,cn=ouadmins,cn=groups,dc=uni,dc=dtr' command d Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/remove-old-homedirs.py", line 143, in handler uid = old["uid"][0] KeyError: 'uid'
Created attachment 9835 [details] append "uid=*" to LDAP filter
(In reply to Daniel Tröder from comment #1) > Created attachment 9835 [details] > append "uid=*" to LDAP filter Sure that this will work? At least if the object has been modified and does no longer match the specified LDAP filter, the listener will NOT trigger the listener module.
(In reply to Sönke Schwardt-Krummrich from comment #2) > (In reply to Daniel Tröder from comment #1) > > Created attachment 9835 [details] > > append "uid=*" to LDAP filter > > Sure that this will work? Sorry - forgot to mention that I have not tested this. > At least if the object has been modified and does no longer match the > specified LDAP filter, the listener will NOT trigger the listener module. 'uid' is mandatory for user accounts, but groups don't have it. That should fit the requirement.
This issue has been filed against UCS@school 4.3 or earlier. UCS 4.3 is out of maintenance and UCS components have vastly 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 this issue. In this case please provide detailed information on how this issue is affecting you.