<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br> I am doing some automated testing setting up Samba4 AD DC and Realmd.<br><br></div> The thing is that realm discover [Samba4-domain] gives an error:<br><br>vagrant@client002:~$ realm discover -v <a href="http://openforce.org" target="_blank">openforce.org</a><br>
* Resolving: _ldap._<a href="http://tcp.openforce.org" target="_blank">tcp.openforce.org</a><br> * Performing LDAP DSE lookup on: 192.168.33.2<br> ! Received invalid or unsupported Netlogon data from server<br><a href="http://openforce.org" target="_blank">openforce.org</a><br>
type: kerberos<br> realm-name: <a href="http://OPENFORCE.ORG" target="_blank">OPENFORCE.ORG</a><br> domain-name: <a href="http://openforce.org" target="_blank">openforce.org</a><br> configured: no<br><br><br></div>..it works when you do a discover of a Microsoft Active Directory-domain.<br>
<br></div>I think the problem lies in Samba4 AD DC not exposing certain capabilities. The code in question in realmd is this:<br><br>realm_disco_mscldap_request (LDAP *ldap,<br> int *msgidp,<br>
GError **error)<br>{<br> char *attrs[] = { "NetLogon", NULL };<br> int rc;<br><br> rc = ldap_search_ext (ldap, "", LDAP_SCOPE_BASE,<br> "(&(NtVer=\\06\\00\\00\\00)(AAC=\\00\\00\\00\\00))",<br>
attrs, 0, NULL, NULL, NULL,<br> -1, msgidp);<br><br> if (rc != LDAP_SUCCESS) {<br> realm_ldap_set_error (error, ldap, rc);<br> return FALSE;<br>
}<br><br> return TRUE;<br>}<br><br></div>Sorry, I haven't
been able to decipher the LDAP-query further, I was also able to see
this using Wireshark when I wiretapped the connection.<br><br></div>Samba4
AD DC returns nothing, while MS AD returns...something. I haven't been
able to reproduce the query. There is something going on with anonymous
binding, and there is a query send with "NetLogon", but I haven't been
able to reproduce this query manually with any success.<br>
<br><br></div><div> FYI: I am using samba4 4.1.6 from the Ubuntu-repo.
If you know of any PPA with current trunk, I would be grateful for that
information.<br><br></div>Regards,<br></div>Niklas</div>