Bug 15323 - net ads search -P doesn't work against servers in other domains
Summary: net ads search -P doesn't work against servers in other domains
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.18.0rc4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-02 13:46 UTC by Stefan Metzmacher
Modified: 2023-05-11 07:10 UTC (History)
2 users (show)

See Also:


Attachments
Patches for v4-18-test (5.67 KB, patch)
2023-04-12 12:11 UTC, Stefan Metzmacher
asn: review+
Details
Patches for v4-17-test (5.67 KB, patch)
2023-04-12 12:12 UTC, Stefan Metzmacher
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2023-03-02 13:46:02 UTC
This is what we had in 4.12:

slow@titan:~/git/samba/v412$ sudo bin/net ads search -P '(objectClass=Domain)' name
Got 1 replies

name: wdom2

slow@titan:~/git/samba/v412$ sudo bin/net ads search -P --server dom-w2k16-3.wdom2.site '(objectClass=Domain)' name
Got 1 replies

name: wdom2

slow@titan:~/git/samba/v412$ sudo bin/net ads search -P --server w2k16-1.wdom1.site '(objectClass=Domain)' name
Got 1 replies

name: wdom1


And this is what 4.17 gives:

slow@titan:~/git/samba/v417$ sudo bin/net ads search -P '(objectClass=Domain)' name
Got 1 replies

name: wdom2

slow@titan:~/git/samba/v417$ sudo bin/net ads search -P --server dom-w2k16-3.wdom2.site '(objectClass=Domain)' name
Got 1 replies

name: wdom2

slow@titan:~/git/samba/v417$ sudo bin/net ads search -P --server w2k16-1.wdom1.site '(objectClass=Domain)' name
kerberos_kinit_password TITAN$@WDOM1.SITE failed: Client not found in Kerberos database


The difference is that ads_struct->auth.realm is NULL in 4.17, while it was
WDOM2.SITE in 4.12.
Comment 1 Samba QA Contact 2023-04-06 13:45:04 UTC
This bug was referenced in samba master:

3b585f9e8cc320841fab4cd5c3be53788d0a87ac
0ef53b948e13eb36b536228cccd89aa4c2adbb90
Comment 2 Stefan Metzmacher 2023-04-12 12:11:30 UTC
Created attachment 17858 [details]
Patches for v4-18-test
Comment 3 Stefan Metzmacher 2023-04-12 12:12:16 UTC
Created attachment 17859 [details]
Patches for v4-17-test
Comment 4 Andreas Schneider 2023-04-12 14:03:38 UTC
Jule, please apply the patches to the corresponding branches. Thanks!
Comment 5 Jule Anger 2023-04-14 12:21:13 UTC
Pushed to autobuild-v4-{18,17}-test.
Comment 6 Samba QA Contact 2023-04-14 13:31:06 UTC
This bug was referenced in samba v4-17-test:

45a264bf5b6cd8116ed9c45086163d33da9ea7a4
fd477e4ff6f90568648059280cbf80f241ba3248
Comment 7 Samba QA Contact 2023-04-16 16:40:20 UTC
This bug was referenced in samba v4-18-test:

4f1d674aa929208a9d623ce933da3d38692f68b8
5cc3c1b5f6b0289f91c01b20989558badc28fd61
Comment 8 Jule Anger 2023-04-17 07:23:25 UTC
Closing out bug report.

Thanks!
Comment 9 Samba QA Contact 2023-04-19 10:23:48 UTC
This bug was referenced in samba v4-18-stable (Release samba-4.18.2):

4f1d674aa929208a9d623ce933da3d38692f68b8
5cc3c1b5f6b0289f91c01b20989558badc28fd61
Comment 10 Samba QA Contact 2023-05-11 07:10:56 UTC
This bug was referenced in samba v4-17-stable (Release samba-4.17.8):

45a264bf5b6cd8116ed9c45086163d33da9ea7a4
fd477e4ff6f90568648059280cbf80f241ba3248