RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1408294 - Provide a debug message when SSSD authentication fails because two IPA accounts share an email address
Summary: Provide a debug message when SSSD authentication fails because two IPA accoun...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Zidek
QA Contact: Michal Reznik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-22 19:45 UTC by David Jones
Modified: 2021-06-10 11:46 UTC (History)
14 users (show)

Fixed In Version: sssd-1.16.0-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 17:09:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
verification_steps (4.78 KB, text/plain)
2018-01-17 08:09 UTC, Michal Reznik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 4326 0 None None None 2020-05-02 18:36:34 UTC
Red Hat Product Errata RHEA-2018:0929 0 None None None 2018-04-10 17:10:41 UTC

Description David Jones 2016-12-22 19:45:30 UTC
Description of problem:
After carefully following the documentation for upgrading from IPA on RHEL 6 to IPA on RHEL 7, and reinstalling the IPA client to use the new IPA server, SSSD keeps printing error "More users with same name...in cache". On one client SSSD crashes, while others it just keeps printing the message.

Version-Release number of selected component (if applicable):


How reproducible:
Error message always on RHEL 7 clients. Not on RHEL 6 clients. 

Steps to Reproduce:
1. Update to RHEL 7 IPA server
2. Reinstall client
3. Wait a little while

Actual results:
Error message, and can't log in to at least one server. (haven't checked them all yet).

Expected results:
Smooth transition. All systems authenticate to new IPA server.

Additional info:

The migration instructions are here:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Linux_Domain_Identity_Authentication_and_Policy_Guide/upgrading.html

I followed them exactly. But it says nothing about how to update the clients.

We only have one IPA server on our LAN, no replicas. 

I ran an update on RHEL 7 and RHEL 6 hosts, including the two IPA servers, prior to the migration. 

I checked the IPA UI for duplicate users, but there are none. 

I also get an error about not being able to contact the CMS server when attempting to delete a host in the UI.

Comment 1 David Jones 2016-12-22 20:04:01 UTC
Note that we have a server still running RHEL 7.1, and it isn't having this issue.

Comment 2 David Jones 2016-12-22 20:15:28 UTC
Also, it's always the same user.

Comment 3 Jakub Hrozek 2016-12-22 20:37:20 UTC
I'm sorry, but this bug report doesn't contain any technical details, so it's impossible to help you without providing them.

Please follow https://fedorahosted.org/sssd/wiki/Reporting_sssd_bugs and include logs and ideally steps to reproduce the issue you're seeing.

On a more general level, bugzilla is not a support forum, but an issue tracker.

Comment 4 David Jones 2016-12-22 21:26:30 UTC
I'm not able to provide logs, due to security restrictions. The best I can do is tell you what's in them.

Running sssd in the forground with debug level 7 I get this when trying to login as user myuser:

'myuser' matched without domain, user is myuser
Requesting info for [myuser] from [<ALL>]
Requesting info for [myuser]
getpwnam call returned more than one result !?!

Then sssd exits.

And yet this users only exists once in the IPA LDAP directory, and there's no local user with this name. This started happening immediately after reinstalling ipa client on every host in our network, just before which the sssd package was updated. No issue before that. No changes to the IPA directory, other than migrating it to a new server. So this does appear to be a bug. SSSD didn't behave this way before. It may be a bug with IPA, though.

"getent passwd myuser" returns nothing, but the command works for other users. 

I tried wiping the cache:

sss_cache -E

But that didn't help. There are some users that have admin accounts, and the admin accounts have the same email address set. I'm wondering if that's has something to do with it.

Comment 5 David Jones 2016-12-22 22:05:18 UTC
Again, this issue only occurs on hosts that have been upgraded to RHEL 7.3.

Comment 6 Sumit Bose 2016-12-22 22:16:03 UTC
In fact since RHEL-7.3 SSSD supports login by email, but I doubt that this causes the issue here, because the email is only checked if the search by user name didn't return a result and at the login prompt a fully qualified name, i.e. a name with an '@' sign in it, was given.

Nevertheless the cache might get corrupted during the update. 'sss_cache -E' only invalidates the entries but does not remove them. So I would recommend to re-try with an empty cache. For this please stop SSSD, move the /var/lib/sss/db/cache_* file to some other directory and restart SSSD. You can remove /var/lib/sss/db/cache_* completely as well, most information can be read from the server again, only cached password are lost. If it is important for the system to work offline as well all user which should access the system offline must login successfully with the password once if the cache it removed to make sure offline authentication is working for them.

Comment 7 David Jones 2016-12-22 22:47:19 UTC
Changing the email address did indeed seem to eliminate the problem. I'll try the method you suggested as well. I'm surprised nobody has run into this already, but perhaps it's unusual for two users to have the same address.

Comment 8 Sumit Bose 2016-12-23 11:58:30 UTC
If it is really about the email and you do not want to change the email addresses in LDAP permanently you can set 'ldap_user_email = noSuchAttr' in the [domain/...] section of sssd.conf (see man sssd-ldap for details). This will tell SSSD to not read the email attribute from the server.

Comment 10 Lukas Slebodnik 2017-01-02 08:12:23 UTC
(In reply to David Jones from comment #7)
> but perhaps it's unusual for two users to have the same address.
It is a little bit unusual that two different users has the same address.
Could you provide a reason or use-case?

Comment 11 David Jones 2017-01-03 20:01:08 UTC
As I said before, administrators have a separate user account for doing admin work. There was no reason to anticipate that giving both accounts the same email address would cause a problem. It's not a required attribute, and you're allowed to list more than one of them under contact info. 

Anyways, it doesn't matter in our case, as email addresses are all managed in postfix. So I removed the redundant addresses, which eliminated the problem. I suppose it does effect LDAP address lookup in Thunderbird, though. 

It does make the software rather fragile, and so, in my opinion, is definitely a bug. It's one of those hidden gotchas that is difficult to find information on and wastes a lot of time trying to troubleshoot. I'm not able to provide a patch or anything like that, but at least you know the bug is there now.

Comment 12 David Jones 2017-01-03 20:09:36 UTC
SSSD version is 1.14.0-43

Comment 13 Lukas Slebodnik 2017-01-03 21:53:32 UTC
Of course it is a bug if sssd crashed.
I just wanted to find a workaround for you and we are glad that removing duplicate email fixed that for you. Thank you very much for the report.

Comment 14 Jakub Hrozek 2017-02-01 10:38:39 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/3293

Comment 15 Jakub Hrozek 2017-08-10 11:07:36 UTC
ack for 7.5 development, but please note that fix might only include a clearer way to debug or spot the issue and an advise to work around it

Comment 16 Jakub Hrozek 2017-08-10 18:11:37 UTC
QE: We're not totally sure what the scope of the fix will be, but testing the fix will require having a server with two accounts sharing the same e-mail address.

Log in as one user and then the other.

Even if the second login fails, there should be a clear indication why it did either in the syslog or the debug logs.

Comment 17 Jakub Hrozek 2017-11-13 16:20:14 UTC
master: 39d6a3b

Comment 19 Orion Poplawski 2017-12-14 19:05:06 UTC
I wouldn't close this issue until the actual problem is fixed.

Comment 20 Jakub Hrozek 2017-12-15 10:04:40 UTC
(In reply to Orion Poplawski from comment #19)
> I wouldn't close this issue until the actual problem is fixed.

I'm fine with opening a new bugzilla to track the actual solution.

Comment 21 Jakub Hrozek 2017-12-15 10:05:49 UTC
(In reply to Jakub Hrozek from comment #20)
> (In reply to Orion Poplawski from comment #19)
> > I wouldn't close this issue until the actual problem is fixed.
> 
> I'm fine with opening a new bugzilla to track the actual solution.

https://pagure.io/SSSD/sssd/issue/3607

Comment 22 Michal Reznik 2018-01-17 08:08:51 UTC
Verified on:

ipa-server-4.5.4-7.el7.x86_64
sssd-1.16.0-13.el7.x86_64

Comment 23 Michal Reznik 2018-01-17 08:09:50 UTC
Created attachment 1382258 [details]
verification_steps

Comment 26 errata-xmlrpc 2018-04-10 17:09:10 UTC
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.

https://access.redhat.com/errata/RHEA-2018:0929


Note You need to log in before you can comment on or make changes to this bug.