searching ldap by guid/uid

fintan fintan.macmahon at gmail.com
Thu Aug 30 11:53:40 CEST 2007


Hi I'm trying to search eDirectory by the guid/uid. My query would look
something like this.

(&(!(loginDisabled=True))(!(givenname=System))(|(guid=809c175abd1eda11bb4c003005470881)))

When I try to decode the guid/uid into hex. I get a type error.

   ldap_result_id = l.search(searchBase, searchScope, searchFilter,
retrieveAttributes)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 478, in
search
    return self.search_ext
(base,scope,filterstr,attrlist,attrsonly,None,None)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 470, in
search_ext
    timeout,sizelimit,
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 94, in
_ldap_call
    result = func(*args,**kwargs)
TypeError: argument 3 must be string without null bytes, not str

I was wondering is it possible to search by a hex value? Thanks

   fintan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20070830/82b89b65/attachment.html>


More information about the python-ldap mailing list