Bug 14908 - net ads status -P broken in a clustered environment
Summary: net ads status -P broken in a clustered environment
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Clustering (show other bugs)
Version: 4.15.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
Depends on:
Reported: 2021-11-16 15:48 UTC by Volker Lendecke
Modified: 2021-11-19 09:07 UTC (History)
2 users (show)

See Also:

Patch (8.34 KB, text/plain)
2021-11-17 15:42 UTC, Volker Lendecke
no flags Details
Patch for 4.15 with cherry-pick info (8.99 KB, text/plain)
2021-11-18 09:14 UTC, Volker Lendecke
slow: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lendecke 2021-11-16 15:48:42 UTC
-P looks at the wrong secrets.tdb when running clustered. cli_credentials_set_machine_account(), which is called from popt_common_credentials_callback(), only uses dbwrap_local_open(). For the source3/ utilities it must use db_open() that also looks at ctdb-based databases.
Comment 1 Volker Lendecke 2021-11-17 15:42:56 UTC
Created attachment 17000 [details]

This fixes the problem for me. Not sure we want this in master, to me the solution looks really ugly, but giving time constraints I don't have a better solution
Comment 2 Ralph Böhme 2021-11-17 16:46:30 UTC
Thanks for looking into this! It won't win us a price, but that seems to be the best thing we can do atm. :) Looks good to me, give me a test and I'd push the same second. :)

Andreas, maybe you want to take a look as well?
Comment 3 Jeremy Allison 2021-11-17 17:07:52 UTC
(In reply to Ralph Böhme from comment #2)

> give me a test and I'd push the same second. :)

Correct me if I'm wrong but it *has* a test, doesn't it ? :-).
Comment 4 Ralph Böhme 2021-11-17 17:41:14 UTC
Swooooooossssshhhhh..... the sound of a patchset being pushed to autobuild.
Comment 5 Samba QA Contact 2021-11-17 18:30:07 UTC
This bug was referenced in samba master:

Comment 6 Volker Lendecke 2021-11-18 09:14:43 UTC
Created attachment 17001 [details]
Patch for 4.15 with cherry-pick info
Comment 7 Volker Lendecke 2021-11-18 09:15:26 UTC
Comment on attachment 17000 [details]

Comment 8 Ralph Böhme 2021-11-18 09:26:52 UTC
Reassigning to Jule for inclusion in 4.15.
Comment 9 Andreas Schneider 2021-11-18 19:33:18 UTC
Looks fine for me. Thanks for fixing!
Comment 10 Jule Anger 2021-11-19 06:44:17 UTC
Pushed to autobuild-v4-15-test.
Comment 11 Samba QA Contact 2021-11-19 08:25:13 UTC
This bug was referenced in samba v4-15-test:

Comment 12 Jule Anger 2021-11-19 09:07:06 UTC
Closing out bug report.