Displaying 3 results from an estimated 3 matches for "oid_comparator_and".
2019 Apr 06
2
"00002020: Operation unavailable without authentication" using python-ldap
Hello,
I'm writing in regards to this issue I opened on GitHub:
https://github.com/python-ldap/python-ldap/issues/275
I am able to successfully use ldapsearch to query my Samba 4.9.4-Debian DC:
ldapsearch -LLL -Y GSSAPI -H ldap://samba-dc.ad.example.com -b
"dc=ad,dc=example,dc=com" "(objectClass=user)" "sAMAccountName"
However, when I try to use python-ldap I
2019 Apr 06
0
"00002020: Operation unavailable without authentication" using python-ldap
...credentials=creds, lp=lp)
domain_dn = samdb.domain_dn()
res = samdb.search(domain_dn, scope=ldb.SCOPE_SUBTREE,
expression=("(&(objectClass=user)(userAccountControl:%s:=%u))"
% (ldb.OID_COMPARATOR_AND, dsdb.UF_NORMAL_ACCOUNT)),
attrs=["samaccountname"])
if (len(res) == 0):
return
for msg in res:
self.outf.write("%s\n" % msg.get("samaccountname", idx=0))
You may just be trying to reinvent the wheel...
2019 Apr 07
2
"00002020: Operation unavailable without authentication" using python-ldap
...credentials=creds, lp=lp)
>
> domain_dn = samdb.domain_dn()
> res = samdb.search(domain_dn, scope=ldb.SCOPE_SUBTREE,
>
> expression=("(&(objectClass=user)(userAccountControl:%s:=%u))"
> % (ldb.OID_COMPARATOR_AND,
> dsdb.UF_NORMAL_ACCOUNT)),
> attrs=["samaccountname"])
> if (len(res) == 0):
> return
>
> for msg in res:
> self.outf.write("%s\n" % msg.get("samaccountname", idx=0))
>
> Yo...