Bug 15840 - kinit command is failing with Missing cache Error
Summary: kinit command is failing with Missing cache Error
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.21.2
Hardware: All Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-25 09:41 UTC by vivekanand.devworks
Modified: 2025-09-09 15:40 UTC (History)
6 users (show)

See Also:


Attachments
patch from master for v4-22-test (10.44 KB, patch)
2025-07-24 18:58 UTC, Guenther Deschner
asn: review+
Details
patch from master for v4-21-test (10.44 KB, patch)
2025-07-24 18:58 UTC, Guenther Deschner
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vivekanand.devworks 2025-03-25 09:41:54 UTC
We are using Samba in our application and after upgrading to samba version 4.21.2 from 4.17.7 we have observed that kinit command is failing.
Command :
net ads kerberos kinit -d 10  -U "Username"
Error :
kerberos_kinit_password_ext: Missing ccache for "account" and config [(null)]
failed to kinit password: NT code 0x000055da

After analysing the code we found out that commit id  
d49de77 - s3:libads: let kerberos_kinit_password_ext() require an explicit krb5 ccache
had introduced the changes to use an explicit ccache but if we see the code in file 
source3/utils/net_ads.c which is calling   kerberos_kinit_password_ext() is still sending NULL which is resulting into this failure.

 Code:
ret = kerberos_kinit_password_ext(principal,
 password,
 0,
 NULL,
 NULL,
 NULL,
 true,
 true,
 2592000, /* one month */
 NULL,
 NULL,
 NULL,
 &status);

Please have a look into this issue.
Comment 1 Samba QA Contact 2025-07-24 17:32:03 UTC
This bug was referenced in samba master:

18d0574a0fe4b5fd468f949cfaa507ab4519c9e6
8a97afdae788e8d10a51035f8b287dc00293f90d
Comment 2 Guenther Deschner 2025-07-24 18:58:24 UTC
Created attachment 18677 [details]
patch from master for v4-22-test
Comment 3 Guenther Deschner 2025-07-24 18:58:59 UTC
Created attachment 18678 [details]
patch from master for v4-21-test
Comment 4 Andreas Schneider 2025-07-25 14:57:10 UTC
Jule, please apply the patches to the corresponding branches. Thanks!
Comment 5 Jule Anger 2025-08-06 08:07:25 UTC
Pushed to autobuild-v4-{22,21}-test.
Comment 6 Samba QA Contact 2025-08-06 09:30:11 UTC
This bug was referenced in samba v4-21-test:

d9fc8dc0d4b775e9b17ef8c5b7aee504ca3fafe7
9ca7d637aae14c49fa82f3a7becf9b2c1c5f5bf8
Comment 7 Samba QA Contact 2025-08-11 07:54:04 UTC
This bug was referenced in samba v4-22-test:

b17dec310680ddc5f8d704e6cf3d4c6194f86acc
25f5debf01e8163d06c0039fb6a84b3ef0c4ded3
Comment 8 Jule Anger 2025-08-11 11:17:40 UTC
Closing out bug report.

Thanks!
Comment 9 Samba QA Contact 2025-08-21 15:25:13 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.4):

b17dec310680ddc5f8d704e6cf3d4c6194f86acc
25f5debf01e8163d06c0039fb6a84b3ef0c4ded3
Comment 10 Samba QA Contact 2025-09-09 15:40:07 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.8):

d9fc8dc0d4b775e9b17ef8c5b7aee504ca3fafe7
9ca7d637aae14c49fa82f3a7becf9b2c1c5f5bf8