Univention Bugzilla – Bug 50840
UDM Traceback with negative shadowLastChange
Last modified: 2020-08-27 08:36:50 CEST
Customer created by accident a password policy (?) for one user to 99999 days. Since then udm users/user list brings a traceback: ---------- UCS Version: 4.4-0 errata243 (Blumenthal) Interner Server-Fehler in "udm/query (users/user)". ValueError: year out of range return time.strftime("%Y-%m-%d", time.gmtime(long(days) * 3600 * 24)) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 836, in posixDaysToDate return posixDaysToDate(shadow_last_change + shadow_max) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1034, in unmapPasswordExpiry info[key] = func(oldattr) File "/usr/lib/pymodules/python2.7/univention/admin/mapping.py", line 532, in unmapValues oldinfo = self.mapping.unmapValues(self.oldattr) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 235, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1243, in __init__ result.append(cls(co, lo, None, dn=dn, superordinate=superordinate, attributes=attrs)) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 1723, in lookup result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 668, in search result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 605, in _thread return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__ tmp = self._function() File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 78, in _run Request: udm/query (users/user) Interner Server-Fehler in "udm/query (users/user)". ----------- Policy was remove and as well tried to delete the user but UMC reported failuree in doing so. Errors are now happening when searching for the user or executing udm users/user list as above. Checking for the user with univention-ldapsearch showed a negative shadowLastChange. Removing this with ldapmodify (see article URL) fixed the error so far udm should not crash in this way...
reported again: Version: 4.4-0 errata243 (Blumenthal) Remark: Fehler tritt bei einem User auf, für den eine separate Passwort-Policy mit 99999 Tagen Laufzeit eingestellt wurde. Der Fehler verschwindet nicht, obwohl User und Policy bereits gelöscht wurden. Traceback(29b14ab10cc0cdaf061b6f4d3e26166e): Interner Server-Fehler in "udm/syntax/choices (users/user)". Request: udm/syntax/choices (users/user) File "%PY2.7%/notifier/threads.py", line 78, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 97, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 976, in _thread return read_syntax_choices(syntax, request.options, ldap_connection=ldap_connection, ldap_position=ldap_position) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 1506, in read_syntax_choices obj = module.get(dn) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 701, in get obj = self.module.object(None, ldap_connection, None, ldap_dn, superordinate, attributes=attributes) File "%PY2.7%/univention/admin/handlers/users/user.py", line 1243, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "%PY2.7%/univention/admin/handlers/__init__.py", line 235, in __init__ oldinfo = self.mapping.unmapValues(self.oldattr) File "%PY2.7%/univention/admin/mapping.py", line 532, in unmapValues info[key] = func(oldattr) File "%PY2.7%/univention/admin/handlers/users/user.py", line 1034, in unmapPasswordExpiry return posixDaysToDate(shadow_last_change + shadow_max) File "%PY2.7%/univention/admin/handlers/users/user.py", line 836, in posixDaysToDate return time.strftime("%Y-%m-%d", time.gmtime(long(days) * 3600 * 24)) ValueError: year out of range Role: domaincontroller_master