Bug 15714 - net ads testjoin and other commands use the wrong secrets.tdb in a cluster
Summary: net ads testjoin and other commands use the wrong secrets.tdb in a cluster
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Clustering (show other bugs)
Version: 4.21.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL: https://gitlab.com/samba-team/samba/-...
Keywords:
: 15728 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-11 16:24 UTC by Stefan Metzmacher
Modified: 2024-10-02 14:30 UTC (History)
3 users (show)

See Also:


Attachments
Patches for v4-21-test (6.67 KB, text/plain)
2024-09-30 14:33 UTC, Stefan Metzmacher
npower: review+
martins: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2024-09-11 16:24:16 UTC
net_use_krb_machine_account() uses cli_credentials_set_machine_account(),
which only tries a local tdb...

It should use secrets_db_ctx(); and cli_credentials_set_machine_account_db_ctx()
instead...
Comment 1 Björn Baumbach 2024-09-12 09:26:34 UTC
Symptoms are:
# net ads testjoin
gensec_gse_client_prepare_ccache: Kinit for CTDB$@TEMP.TEST to access ldap/dc6.temp.test failed: Preauthentication failed: NT_STATUS_LOGON_FAILURE
ads_startup_int: ads_connect_creds: Invalid credentials
Join to domain is not valid: LDAP_INVALID_CREDENTIALS
Comment 2 Martin Schwenke 2024-09-19 03:26:08 UTC
Is this related to a bug I've seen where my original join fails, but "net ads testjoin" declares the join to be OK?

I've been meaning to look into it...
Comment 3 Samba QA Contact 2024-09-20 05:55:04 UTC
This bug was referenced in samba master:

690c800c33df4d06d409b9ccfa57e5fa575ab1aa
ab3fc1595c0a2e0aa3719cc2fe4684e9a0a2f9d8
f9ee4db2ba74e4f1f1b6d6f32082e5b0fe60f9b9
Comment 4 Stefan Metzmacher 2024-09-30 14:27:28 UTC
*** Bug 15728 has been marked as a duplicate of this bug. ***
Comment 5 Stefan Metzmacher 2024-09-30 14:33:03 UTC
Created attachment 18450 [details]
Patches for v4-21-test
Comment 6 Noel Power 2024-09-30 15:45:34 UTC
Comment on attachment 18450 [details]
Patches for v4-21-test

lgtm
Comment 7 Noel Power 2024-09-30 15:46:37 UTC
reassign to Jule for inclusion with 4.21
Comment 8 Jule Anger 2024-10-02 08:07:47 UTC
Pushed to autobuild-v4-21-test.
Comment 9 Samba QA Contact 2024-10-02 09:29:11 UTC
This bug was referenced in samba v4-21-test:

52772aed8b48543de715ac546ca8571ab492eb9e
d583d40ca328db2a6b8af05bfdc79f766d9955de
4bec0a7fd109370fbfb6daca85fd293b0f430b8a
Comment 10 Jule Anger 2024-10-02 14:30:32 UTC
Closing out bug report.

Thanks!