Bug 981033 - Local user's krb5cc deleted by pam_winbind
Summary: Local user's krb5cc deleted by pam_winbind
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-03 20:10 UTC by David Woodhouse
Modified: 2013-08-12 12:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-12 12:37:40 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Samba Project 9994 None None None Never

Description David Woodhouse 2013-07-03 20:10:04 UTC
When I get my password wrong, winbindd *deletes* my existing, valid, credentials cache.

This is particularly horrid of it when I'm running as a user who doesn't exist in the domain, so even when I subsequently get my password *right*, it's matched by pam_unix not pam_winbind, and I don't even get my TGT recreated.

Comment 1 David Woodhouse 2013-07-03 20:11:27 UTC
Trying this patch now, which will probably make me happy but I'm not fully aware of the other implications of it:

--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -691,6 +691,8 @@ failed:
 	 * local host and therefor didn't get the PAC, we need to remove that
 	 * cache entirely now */
 
+	if (user_ccache_file)
+		return result;
 	krb5_ret = ads_kdestroy(cc);
 	if (krb5_ret) {
 		DEBUG(3,("winbindd_raw_kerberos_login: "

Comment 2 Andreas Schneider 2013-07-05 09:46:12 UTC
I will look into it. Thanks for the bug report!

Comment 3 David Woodhouse 2013-07-11 10:50:52 UTC
Koji scratch build with the above patch (to prevent my users from lynching me when winbind keeps stealing their TGTs) at
http://koji.fedoraproject.org/koji/taskinfo?taskID=5593624

Comment 4 Andreas Schneider 2013-07-11 11:44:42 UTC
Yes, the patch looks fine. I will propose it upstream. Thanks!

Comment 5 Andreas Schneider 2013-07-11 11:46:56 UTC
How do you reproduce it?

Comment 6 David Woodhouse 2013-07-11 20:03:41 UTC
sudo whoami
 <get password wrong>


Do not subsequently get your password *right*, if you are actually authenticated by pam_winbind. That'll give you a new TGT and mask the problem.

If, like me, your local username doesn't match your Windows username and you actually "log in" to winbind with 'wbinfo -K $WINUSER', the problem is much easier to notice.

Comment 7 David Woodhouse 2013-07-11 21:01:22 UTC
That reproducer was mentioned in the uptream bug btw.

Comment 8 Stijn Hoop 2013-08-12 11:33:23 UTC
Most probably related to https://bugzilla.samba.org/show_bug.cgi?id=9108
(we were seeing the same thing and searched in samba BZ first)

Comment 9 Andreas Schneider 2013-08-12 12:37:40 UTC
This has been fixed in Samba 4.0.8.


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