Univention Bugzilla – Bug 46171
86_selenium/10_product_test_password_change fails
Last modified: 2018-08-09 10:26:57 CEST
Created attachment 9368 [details] the error Changing ones own password through users settings -> change password only works the first time. On the second try, there's an error "The entered password does not match the current one", even if it does. Trying the first password (before the first password change) or logging out and in again fails as well.
Fehlermeldung Test failed Standard Ausgabe (STDOUT) [2018-01-26 02:37:42.636571] skipping samba password policy adjustment [2018-01-26 02:37:42.636617] Creating container/cn object with /usr/sbin/udm-test container/cn create --position cn=users,dc=autotest090,dc=local --set name=testusers [2018-01-26 02:37:43.745274] Creating users/user object with /usr/sbin/udm-test users/user create --position cn=testusers,cn=users,dc=autotest090,dc=local --set username=z2wmha7kkv --set password=univention --set firstname=rutpje4nee --set lastname=wzk1qpsj7u [2018-01-26 02:37:45.678534] Creating users/user object with /usr/sbin/udm-test users/user create --position cn=testusers,cn=users,dc=autotest090,dc=local --set username=dyb86is1qt --set firstname=bfl38mjcwd --set lastname=kncp1lpgdi --set 'primaryGroup=cn=Domain Admins,cn=groups,dc=autotest090,dc=local' --set password=univention [2018-01-26 02:37:47.080098] Creating policies/pwhistory object with /usr/sbin/udm-test policies/pwhistory create --position cn=pwhistory,cn=users,cn=policies,dc=autotest090,dc=local --set length=3 --set name=ucs-test_pw_policy --set pwLength=8 [2018-01-26 02:37:47.366897] Modifying container/cn object with /usr/sbin/udm-test container/cn modify --dn cn=testusers,cn=users,dc=autotest090,dc=local --policy-reference cn=ucs-test_pw_policy,cn=pwhistory,cn=users,cn=policies,dc=autotest090,dc=local [2018-01-26 02:37:49.163147] INFO:univention.testing.selenium.interactions:Entering 'dyb86is1qt' into the input-field 'username'. [2018-01-26 02:37:49.799285] INFO:univention.testing.selenium.interactions:Entering 'univention' into the input-field 'password'. [2018-01-26 02:37:50.079522] INFO:univention.testing.selenium.interactions:Submitting input field 'password'. [2018-01-26 02:37:50.301945] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['Users', 'Devices', 'Domain', 'System', 'Software', 'Installed Applications', 'no module available'] [2018-01-26 02:37:55.557919] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'no module available' [2018-01-26 02:37:56.656679] INFO:univention.testing.selenium.base:Successful login [2018-01-26 02:37:57.250797] INFO:univention.testing.selenium.interactions:Clicking the text 'User settings' [2018-01-26 02:37:58.563927] INFO:univention.testing.selenium.interactions:Clicking the text 'Change password' [2018-01-26 02:37:59.430588] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'Change the password of' [2018-01-26 02:38:00.270188] INFO:univention.testing.selenium.interactions:Entering 'univention' into the input-field 'password'. [2018-01-26 02:38:01.265424] INFO:univention.testing.selenium.interactions:Entering 'vgt7r2greg' into the input-field 'new_password_1'. [2018-01-26 02:38:02.452072] INFO:univention.testing.selenium.interactions:Entering 'vgt7r2greg' into the input-field 'new_password_2'. [2018-01-26 02:38:03.749727] INFO:univention.testing.selenium.interactions:Clicking the button 'Change password' [2018-01-26 02:38:04.314445] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['password has been changed', 'password was already used', 'password is too short', 'password is too simple'] [2018-01-26 02:38:08.786605] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'password was already used' [2018-01-26 02:38:09.912187] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'password is too simple' [2018-01-26 02:38:10.919110] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'password is too short' [2018-01-26 02:38:12.013434] INFO:univention.testing.selenium.interactions:Clicking the button 'Ok' [2018-01-26 02:38:12.297167] INFO:univention.testing.selenium.checks_and_waits:Waiting for all dialogues to close. [2018-01-26 02:38:21.086322] INFO:univention.testing.selenium.interactions:Entering 'dyb86is1qt' into the input-field 'username'. [2018-01-26 02:38:22.591293] INFO:univention.testing.selenium.interactions:Entering 'vgt7r2greg' into the input-field 'password'. [2018-01-26 02:38:23.328091] INFO:univention.testing.selenium.interactions:Submitting input field 'password'. [2018-01-26 02:38:23.579229] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['Users', 'Devices', 'Domain', 'System', 'Software', 'Installed Applications', 'no module available'] [2018-01-26 02:38:34.876510] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'no module available' [2018-01-26 02:38:35.962895] INFO:univention.testing.selenium.base:Successful login [2018-01-26 02:38:49.252118] INFO:univention.testing.selenium.interactions:Entering 'z2wmha7kkv' into the input-field 'username'. [2018-01-26 02:38:49.926991] INFO:univention.testing.selenium.interactions:Entering 'univention' into the input-field 'password'. [2018-01-26 02:38:50.214359] INFO:univention.testing.selenium.interactions:Submitting input field 'password'. [2018-01-26 02:38:50.356667] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['Users', 'Devices', 'Domain', 'System', 'Software', 'Installed Applications', 'no module available'] [2018-01-26 02:38:53.969598] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'no module available' [2018-01-26 02:38:54.001875] INFO:univention.testing.selenium.interactions:Clicking the button 'Ok' [2018-01-26 02:38:54.181288] INFO:univention.testing.selenium.checks_and_waits:Waiting for all dialogues to close. [2018-01-26 02:38:54.775541] INFO:univention.testing.selenium.base:Successful login [2018-01-26 02:38:55.013518] INFO:univention.testing.selenium.interactions:Clicking the text 'User settings' [2018-01-26 02:38:55.622712] INFO:univention.testing.selenium.interactions:Clicking the text 'Change password' [2018-01-26 02:38:56.038509] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'Change the password of' [2018-01-26 02:38:56.339190] INFO:univention.testing.selenium.interactions:Entering 'univention' into the input-field 'password'. [2018-01-26 02:38:56.935314] INFO:univention.testing.selenium.interactions:Entering 'ykq0e4iixf' into the input-field 'new_password_1'. [2018-01-26 02:38:57.268306] INFO:univention.testing.selenium.interactions:Entering 'ykq0e4iixf' into the input-field 'new_password_2'. [2018-01-26 02:38:57.612095] INFO:univention.testing.selenium.interactions:Clicking the button 'Change password' [2018-01-26 02:38:57.826647] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['password has been changed', 'password was already used', 'password is too short', 'password is too simple'] [2018-01-26 02:38:59.482083] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'password was already used' [2018-01-26 02:39:00.515379] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'password is too simple' [2018-01-26 02:39:01.548701] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'password is too short' [2018-01-26 02:39:02.590622] INFO:univention.testing.selenium.interactions:Clicking the button 'Ok' [2018-01-26 02:39:02.748912] INFO:univention.testing.selenium.checks_and_waits:Waiting for all dialogues to close. [2018-01-26 02:39:06.879052] INFO:univention.testing.selenium.interactions:Entering 'z2wmha7kkv' into the input-field 'username'. [2018-01-26 02:39:07.570436] INFO:univention.testing.selenium.interactions:Entering 'ykq0e4iixf' into the input-field 'password'. [2018-01-26 02:39:07.874048] INFO:univention.testing.selenium.interactions:Submitting input field 'password'. [2018-01-26 02:39:08.096359] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['Users', 'Devices', 'Domain', 'System', 'Software', 'Installed Applications', 'no module available'] [2018-01-26 02:39:10.549324] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'no module available' [2018-01-26 02:39:10.574919] INFO:univention.testing.selenium.interactions:Clicking the button 'Ok' [2018-01-26 02:39:10.766230] INFO:univention.testing.selenium.checks_and_waits:Waiting for all dialogues to close. [2018-01-26 02:39:11.357196] INFO:univention.testing.selenium.base:Successful login [2018-01-26 02:39:15.045495] INFO:univention.testing.selenium.interactions:Entering 'dyb86is1qt' into the input-field 'username'. [2018-01-26 02:39:15.771076] INFO:univention.testing.selenium.interactions:Entering 'vgt7r2greg' into the input-field 'password'. [2018-01-26 02:39:16.050038] INFO:univention.testing.selenium.interactions:Submitting input field 'password'. [2018-01-26 02:39:16.300850] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['Users', 'Devices', 'Domain', 'System', 'Software', 'Installed Applications', 'no module available'] [2018-01-26 02:39:21.967655] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'no module available' [2018-01-26 02:39:23.059316] INFO:univention.testing.selenium.base:Successful login [2018-01-26 02:39:37.099939] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'Search query' [2018-01-26 02:39:37.193597] INFO:univention.testing.selenium.interactions:Clicking the tile 'Users' [2018-01-26 02:39:37.642834] INFO:univention.testing.selenium.checks_and_waits:Waiting for all standby animations to disappear. [2018-01-26 02:39:41.784841] *** waiting for main grid load [2018-01-26 02:39:46.787177] INFO:univention.testing.selenium.checks_and_waits:Waiting for all standby animations to disappear. [2018-01-26 02:39:47.488684] INFO:univention.testing.selenium.interactions:Clicking the text 'User settings' [2018-01-26 02:39:48.309746] INFO:univention.testing.selenium.interactions:Clicking the text 'Change password' [2018-01-26 02:39:48.846122] INFO:univention.testing.selenium.checks_and_waits:Waiting for text: 'Change the password of' [2018-01-26 02:39:49.315809] INFO:univention.testing.selenium.interactions:Entering 'vgt7r2greg' into the input-field 'password'. [2018-01-26 02:39:50.065042] INFO:univention.testing.selenium.interactions:Entering '90he35oyl0' into the input-field 'new_password_1'. [2018-01-26 02:39:50.431981] INFO:univention.testing.selenium.interactions:Entering '90he35oyl0' into the input-field 'new_password_2'. [2018-01-26 02:39:50.975113] INFO:univention.testing.selenium.interactions:Clicking the button 'Change password' [2018-01-26 02:39:51.285931] INFO:univention.testing.selenium.checks_and_waits:Waiting until any of those texts is visible: ['password has been changed', 'password was already used', 'password is too short', 'password is too simple'] [2018-01-26 02:40:51.330827] ERROR:univention.testing.selenium.base:Exception: <class 'selenium.common.exceptions.TimeoutException'> Message: waited 60 seconds for texts ['password has been changed', 'password was already used', 'password is too short', 'password is too simple'] [2018-01-26 02:40:53.332719] INFO:univention.testing.selenium.base:Saving screenshot '/usr/share/ucs-test/86_selenium/selenium/error_en_20180126024053.png' [2018-01-26 02:40:54.022409] INFO:univention.testing.selenium.base:Saving browser log '/usr/share/ucs-test/86_selenium/selenium/error_en_browserlog_20180126024054.txt' [2018-01-26 02:40:54.098961] Cleanup after exception: <class 'selenium.common.exceptions.TimeoutException'> Message: waited 60 seconds for texts ['password has been changed', 'password was already used', 'password is too short', 'password is too simple'] [2018-01-26 02:40:54.099034] [2018-01-26 02:40:54.099109] Performing UCSTestUDM cleanup... [2018-01-26 02:40:54.099244] removing DN: cn=ucs-test_pw_policy,cn=pwhistory,cn=users,cn=policies,dc=autotest090,dc=local [2018-01-26 02:40:54.426608] removing DN: uid=z2wmha7kkv,cn=testusers,cn=users,dc=autotest090,dc=local [2018-01-26 02:40:54.701308] removing DN: uid=dyb86is1qt,cn=testusers,cn=users,dc=autotest090,dc=local [2018-01-26 02:40:54.930816] removing DN: cn=testusers,cn=users,dc=autotest090,dc=local [2018-01-26 02:40:55.124093] trying to restart UDM CLI server [2018-01-26 02:40:55.146482] sending signal 15 to process 1599 (['/usr/bin/python2.7', '/usr/share/univention-directory-manager-tools/univention-cli-server']) [2018-01-26 02:40:56.163407] process already terminated [2018-01-26 02:40:56.163501] UCSTestUDM cleanup done [2018-01-26 02:40:56.163606] Traceback (most recent call last): [2018-01-26 02:40:56.163653] File "10_product_test_password_change", line 250, in <module> [2018-01-26 02:40:56.163760] umc_tester.test_umc() [2018-01-26 02:40:56.163808] File "10_product_test_password_change", line 62, in test_umc [2018-01-26 02:40:56.163882] self.test_usability_of_a_module_after_password_change(self.admin, uts.random_string()) [2018-01-26 02:40:56.163927] File "10_product_test_password_change", line 100, in test_usability_of_a_module_after_password_change [2018-01-26 02:40:56.164029] self.change_own_password(old_password, user.password) [2018-01-26 02:40:56.164076] File "10_product_test_password_change", line 199, in change_own_password [2018-01-26 02:40:56.164163] _('password is too simple'), [2018-01-26 02:40:56.164209] File "/usr/lib/pymodules/python2.7/univention/testing/selenium/checks_and_waits.py", line 57, in wait_for_any_text_in_list [2018-01-26 02:40:56.165148] self.get_all_visible_elements, 'waited %s seconds for texts %r' % (timeout, texts) [2018-01-26 02:40:56.165198] File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/wait.py", line 80, in until [2018-01-26 02:40:56.165816] raise TimeoutException(message, screen, stacktrace) [2018-01-26 02:40:56.165971] selenium.common.exceptions.TimeoutException: Message: waited 60 seconds for texts ['password has been changed', 'password was already used', 'password is too short', 'password is too simple'] [2018-01-26 02:40:56.166015]
Jan 26 02:28:03 ucs-2980 python2.7: pam_unix(univention-management-console:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=test2 Jan 26 02:28:03 ucs-2980 python2.7: pam_krb5(univention-management-console:auth): authentication failure; logname=test2 uid=0 euid=0 tty= ruser= rhost= Jan 26 02:28:03 ucs-2980 python2.7: pam_unix(univention-management-console:chauthtok): user "test2" does not exist in /etc/passwd It seems like the problem does not have to do with passwords that much, but with authentification in general
This might be caused by Bug #46126, I am not sure.
the test still fails, though the error message differs, depending on wether samba is installed or not. with samba: [2018-02-22 03:38:07.049212] Traceback (most recent call last): [2018-02-22 03:38:07.049224] File "10_product_test_password_change", line 250, in <module> [2018-02-22 03:38:07.051689] umc_tester.test_umc() [2018-02-22 03:38:07.051710] File "10_product_test_password_change", line 64, in test_umc [2018-02-22 03:38:07.051722] self.check_for_password_reuse_error(self.admin) [2018-02-22 03:38:07.051737] File "10_product_test_password_change", line 117, in check_for_password_reuse_error [2018-02-22 03:38:07.051749] raise PasswordChangeError('It was possible to reuse a password.') [2018-02-22 03:38:07.051759] __main__.PasswordChangeError: It was possible to reuse a password. without samba: [2018-02-22 01:56:51.671329] Performing UCSTestUDM cleanup... [2018-02-22 01:56:51.671344] removing DN: cn=ucs-test_pw_policy,cn=pwhistory,cn=users,cn=policies,dc=autotest092,dc=local [2018-02-22 01:56:52.058666] removing DN: uid=i4r1r3v2qs,cn=testusers,cn=users,dc=autotest092,dc=local [2018-02-22 01:56:52.312341] removing DN: uid=e2gutv8qlq,cn=testusers,cn=users,dc=autotest092,dc=local [2018-02-22 01:56:52.580245] removing DN: cn=testusers,cn=users,dc=autotest092,dc=local [2018-02-22 01:56:52.783857] trying to restart UDM CLI server [2018-02-22 01:56:52.842007] sending signal 15 to process 7022 (['/usr/bin/python2.7', '/usr/share/univention-directory-manager-tools/univention-cli-server']) [2018-02-22 01:56:53.845535] process already terminated [2018-02-22 01:56:53.845668] UCSTestUDM cleanup done [2018-02-22 01:56:53.845801] Traceback (most recent call last): [2018-02-22 01:56:53.845857] File "10_product_test_password_change", line 250, in <module> [2018-02-22 01:56:53.845994] umc_tester.test_umc() [2018-02-22 01:56:53.846053] File "10_product_test_password_change", line 65, in test_umc [2018-02-22 01:56:53.846141] self.check_change_password_on_login(self.admin, uts.random_string()) [2018-02-22 01:56:53.846194] File "10_product_test_password_change", line 123, in check_change_password_on_login [2018-02-22 01:56:53.846286] self.set_change_password_on_login_flag(user) [2018-02-22 01:56:53.846339] File "10_product_test_password_change", line 140, in set_change_password_on_login_flag [2018-02-22 01:56:53.846432] self.selenium.wait_for_text(_('Change password on next login')) [2018-02-22 01:56:53.846485] File "/usr/lib/pymodules/python2.7/univention/testing/selenium/checks_and_waits.py", line 50, in wait_for_text [2018-02-22 01:56:53.847339] self.get_all_visible_elements, 'waited %s seconds for text %r' % (timeout, text) [2018-02-22 01:56:53.847396] File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/wait.py", line 80, in until [2018-02-22 01:56:53.848008] raise TimeoutException(message, screen, stacktrace) [2018-02-22 01:56:53.848226] selenium.common.exceptions.TimeoutException: Message: waited 60 seconds for text 'Change password on next login' [2018-02-22 01:56:53.848276]
The test had to be adopted to product changes and now passes on non-samba systems. On samba systems it still fails, and did so for UCS 4.2 for some time now, according to jenkins. I was able to reproduce the problem manually. On all samba 4 systems, you are able to reuse passwords.
this behaviour seems to be related to bug 44470
ucs-test (8.0.28-36) 46c742cbc94c | Bug #46171: fix 86_selenium/10_product_test_password_change adopted the test to changes (comment 6)
ucs-test (8.0.28-40) 67c7fa61494a | Bug #46171: fix 86_selenium/10_product_test_password_change The test should pass now on samba systems as well. to achieve that, the password history gets activated manually for samba in the test. The password history is not automatically on due to bug 44470. The password history also doesn't work for admins in samba for some reason, the test is adapted to that as well.
[2018-02-26 03:09:51.890350] process already terminated [2018-02-26 03:09:51.890461] UCSTestUDM cleanup done [2018-02-26 03:09:51.890587] Traceback (most recent call last): [2018-02-26 03:09:51.890637] File "10_product_test_password_change", line 262, in <module> [2018-02-26 03:09:51.890758] umc_tester.test_umc() [2018-02-26 03:09:51.890815] File "10_product_test_password_change", line 58, in test_umc [2018-02-26 03:09:51.890897] self.add_default_password_policy() [2018-02-26 03:09:51.890947] File "10_product_test_password_change", line 84, in add_default_password_policy [2018-02-26 03:09:51.891032] ucr = ConfigRegistry() [2018-02-26 03:09:51.891170] NameError: global name 'ConfigRegistry' is not defined
113a9e2f52 | Fix missing import faa992c811 | Fix more things in 86_selenium/10_product_test_password_change 2402d679a1 | Fix for univention/testing/ucs_samba.py
---Test fails on master with samba Password too simple [2018-03-05 11:52:05.258050] process already terminated [2018-03-05 11:52:05.258165] UCSTestUDM cleanup done [2018-03-05 11:52:05.258327] Traceback (most recent call last): [2018-03-05 11:52:05.258385] File "10_product_test_password_change", line 264, in <module> [2018-03-05 11:52:05.258530] umc_tester.test_umc() [2018-03-05 11:52:05.258586] File "10_product_test_password_change", line 62, in test_umc [2018-03-05 11:52:05.258673] self.test_password_change(self.admin, uts.random_string()) [2018-03-05 11:52:05.258745] File "10_product_test_password_change", line 100, in test_password_change [2018-03-05 11:52:05.258837] self.change_own_password(old_password, user.password) [2018-03-05 11:52:05.258926] File "10_product_test_password_change", line 222, in change_own_password [2018-03-05 11:52:05.259032] raise PasswordTooSimpleError(new_password) [2018-03-05 11:52:05.259224] __main__.PasswordTooSimpleError: 9xd0ts5my9 ---Test fails sporadically on master/backup without samba The screenshot shows a dialog with "Your session has expired, please login again Authentication failed"
[4.3-0 b65aa5da86] * 86_selenium/10_product_test_password_change: disable test case (Bug #46171)
Commit 67c7fa61 changes the settings/sambadomain object without resetting it after the test to the old value.
ucs-test (8.0.28-102) 1e294e5172ff | Bug #46171: Make sure test 86_selenium/10_product_test_password_change cleans up after itself Successful build Package: ucs-test Version: 8.0.28-102A~4.3.0.201803271749 Branch: ucs_4.3-0 Scope: errata4.3-0 User: jahlers All settings get restored to their original value now.
9255180 Bug #46171: enable 10_product_test_password_chage and remove samba password complexity in test
OK password test with samba works OK samba settings cleanup Test looks stable -> verified
Nothing to release.