So I understand the concept of binding to a LDAP server of any kind and performing either authenticated or anonymous queries.And my goal is to get the full dn=...dc=example,dc=com for a specific user.And I know I've set up my samba4 as a AD controller in a way that it shouldn't allow anonymous queries/bindings.What surprises me is that ldbsearch differs from ldapsearch (OpenLDAP's client application) in a way that, it doesn't support authentication?So my basic query looks like:# ldbsearch -H ldap://127.0.0.1 -b DC=example,DC=com (CN=usernameHere)search error - 00002020: Operation unavailable without authenticationNow this is done on the AD controller, and I'm sure you could point out to the .db file containing all the accounts and what not, but I would prefer to be able to do this remotely via smb:// or ldap://.I've also tried smb:// just for the sake of it:Unable to find backend for 'smb://127.0.0.1' - do you need to set LDB_MODULES_PATH?Further more, I've tried using kerberos tickets in order to perhaps see if ldbsearch could pick that up and use that as authentication:# kinit administrator@example.comPassword for administrator@example.com: Warning: Your password will expire in 26 days on Wed 06 Jul 2016 09:27:36 PM CESTldbsearch still gives me the exact same error.So how do you go about perfoming searches on your domain with samba4?I should add that the following command works:# ldbsearch -H ldap://127.0.0.1 -s base -b  defaultNamingContext# record 1dn: defaultNamingContext: DC=example,DC=com# returned 1 records# 1 entries# 0 referrals
samba4's ldbsearch complains about authentication for basic searches
samba;ldap;samba4