Red Hat Bugzilla – Bug 1127278
Auth fails when space in username is replaced with character set by override_default_whitespace
Last modified: 2014-10-14 00:49:24 EDT
Description of problem: When SSSD new feature "override_default_whitespace" is set, it replaces white space from usernames/groupnames with the configured character, lets say _(underscore). So upon lookup user "Harry Potter" becomes "Harry_Potter". In this case, user login fails when auth is conducted without spaces, ie username is "Harry_Potter, however auth works fine with space, ie when username is "Harry Potter". Version-Release number of selected component (if applicable): sssd-1.11.6-12.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. Create an ldap user name with space, say "Harry Potter". 2. Set override_default_whitespace = _ in sssd.conf 3. Login with and without space in user name, you will see that auth fails when username is "Harry_Potter". Actual results: Auth fails. Expected results: Auth should succeed. Additional info:
Upstream ticket: https://fedorahosted.org/sssd/ticket/2397
Fixed upstream: master: ef49e1d709c3cbb3eccbc22710964e1ffe2612c9 3b96d478851fbbe391ab30e3d6a0afdb9ecdd4a0 fcfd1cb69762c49ba56326dfc85008c1d83333b2 0fcc9ed1c66bed7ef3a0bcd6c517280a82391d2b f3a5ac1a50c1fccd0801023658e42d2093e1a33a 1f3127e88a87953f059c9a70d3582ae1719594b1 sssd-1-11: 3fa31631d74d09ce6b52b6b8cd3c994c9f2a2db4 6bbb1da6dd9365592b4be309cf3bd7f245d844a8 f9cab654c8217a4f1b983bcf92dc36acffffe58f 61cba55a3e44a937703a690254ccb3e0dd65dbb6 5b4c81cab999c1f5a385754badd9e88600cbf3fa
With SSSD Version sssd-1.11.6-24.el6.x86_64, the automation runs FAIL for override_default_whitespace test suite. See the beaker output below:- :: [ LOG ] :: override_default_whitespace_2: Set override_default_whitespace = _ in nss section and run user lookup :: [ BEGIN ] :: Lookup should return name without space. :: actually running 'getent passwd -s sss "Test User"' Test User:*:10011:10011:Example TestUser:/home/Testuser:/bin/bash :: [ PASS ] :: Lookup should return name without space. (Expected 0, got 0) :: [ BEGIN ] :: Lookup should return name without space. :: actually running 'getent passwd -s sss Test_User' :: [ FAIL ] :: Lookup should return name without space. (Expected 0, got 2)
As a result of this ticket, we had a discussion in upstream and we decidet to change name of this option. Currently, you should use option override_space. man sssd.conf -> SPECIAL SECTIONS -> The [sssd] section -> override_space (string) Sorry for troubles. We should have mentioned it in this BZ earlier.
Verified the bug on SSSD Version ; sssd-1.11.6-24.el6.x86_64 I made changes to automation code as per Comment #6 and the beaker run looks great now. See the output below: ================ final pass/fail report ================= Test Date: Mon Aug 25 13:34:09 EDT 2014 Total : [8] Passed: [8] Failed: [0] Abort : [0] --------------------------------------------------------- [ PASS ] Setup [ PASS ] override_space_1 Default behaviour when override_space is not set in sssd.conf [ PASS ] override_space_2 Set override_space = _ in sssd section and run user lookup [ PASS ] override_space_3 Set override_space = _ and run user auth [ PASS ] override_space_4 Set override_space = _ and run user id and groups [ PASS ] override_space_5 Behaviour while running chown and chgrp commands [ PASS ] Cleanup [ PASS ] unknown =========================================================
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1375.html