In Microsoft Actrive Directory 2022, only the beginning and ending spaces are cut out. Manual playback method: add objects to the "Active Directory - users and computers". Result: Only the beginning and ending spaces are cut out (all spaces inside the names are preserved). In Samba: The beginning and ending spaces are cut out + the spaces in the middle of the RDN are glued together. Expected result: samba does not glue spaces inside RDN.
A difficulty with changing this is maintaining self-compatibility through the migration. When we last fixed something here in bugs 14655, 14656, we ended up causing trouble because the indexes no longer matched the database (bug 14902). As Andrew Bartlett said in bug 14902 comment 2, > We should perhaps force a re-index in a future version upgrade > (by bumping SAMDB_INDEXING_VERSION to ensure this is done) > However this will force a reindex regardless which is CPU intensive. That is not to say we shouldn't do it, just that we need to be sure we get it right.