Bug 34478 - Password complexity check triggers error in s4connector and prevents user sync
Password complexity check triggers error in s4connector and prevents user sync
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 3.2
Other Linux
: P1 critical (vote)
: UCS 3.2-1-errata
Assigned To: Stefan Gohmann
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-04 22:06 CEST by Kevin Dominik Korte
Modified: 2014-05-07 15:25 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Connector Logs (83.96 KB, text/x-log)
2014-04-05 18:19 CEST, Kevin Dominik Korte
Details
Samba Logs (10.23 KB, text/plain)
2014-04-05 18:19 CEST, Kevin Dominik Korte
Details
bug34478_password_complexity.patch (1.08 KB, patch)
2014-04-06 10:15 CEST, Stefan Gohmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Dominik Korte univentionstaff 2014-04-04 22:06:44 CEST
If you use an UCS-System with English locals and activate the dictionary check, the s4 connector will not replicate users created with the AD-Tools. The issue is one of the password checks tries to replace Wörterbuch with W?rterbuch. With the ö in Wörterbuch creating an error. The Connector will then write the error in the log with the message that the pwQuality isn't fullfiled

After disabeling the dictionary check, the issue resolves and the users are replicated.

To Replicate it:
Install master with Samba 4
Set the password complexity check and dictionary check
Join English Windows 7
Install AD-User and Computer tools
Create user in AD-Tools (using a compliant password)


I didn't try to replicate the bug with a German language systems.
Comment 1 Stefan Gohmann univentionstaff 2014-04-05 07:32:46 CEST
Can you append the connector and samba log files?
Comment 2 Kevin Dominik Korte univentionstaff 2014-04-05 18:19:34 CEST
Created attachment 5852 [details]
Connector Logs
Comment 3 Kevin Dominik Korte univentionstaff 2014-04-05 18:19:55 CEST
Created attachment 5853 [details]
Samba Logs
Comment 4 Kevin Dominik Korte univentionstaff 2014-04-05 18:22:53 CEST
Logs are attached.

The respective user is "testera" the password Uiaeo123snrt

internally the systems are available at 

kkorte_samba4-test-*
Comment 5 Stefan Gohmann univentionstaff 2014-04-06 10:15:59 CEST
Created attachment 5854 [details]
bug34478_password_complexity.patch

Thanks for the logs. Does the attached patch fix the problem for you?

 patch -d /usr/share/pyshared/ -p 1 <bug34478_password_complexity.patch
 service univention-s4-connector restart
Comment 6 Kevin Dominik Korte univentionstaff 2014-04-06 19:32:02 CEST
Thanks for the fast patch. After applying the steps outlined, both rejected and new users are synchronized between S4 and OpenLDAP. Login works on both. Password change from the Windows, kpasswd and UMC as well.
Comment 7 Arvid Requate univentionstaff 2014-04-10 12:53:59 CEST
We just observed this again in a customer samba3->samba4 migration test.

Maybe we should think about adding and using a univention-lib function to generate a password according to the password policy for a given DN.
For another proposal see also Bug 34067.
Comment 8 Stefan Gohmann univentionstaff 2014-04-22 08:23:06 CEST
The patch has been applied:
 Code: r49469
 YAML: r49471

I've also added a test case (r49470): 030_sync_with_activated_pwqualitycheck

(In reply to Arvid Requate from comment #7)
> We just observed this again in a customer samba3->samba4 migration test.
> 
> Maybe we should think about adding and using a univention-lib function to
> generate a password according to the password policy for a given DN.
> For another proposal see also Bug 34067.

Yes, that might be something for a later fix.
Comment 9 Arvid Requate univentionstaff 2014-05-06 16:40:29 CEST
Verified:
* The password complexity is improved significantly.
* The test case works
* YAML advisory ok.
Comment 10 Moritz Muehlenhoff univentionstaff 2014-05-07 15:25:58 CEST
http://errata.univention.de/ucs/3.2/107.html