how to write filter argumnt for search function of LDAPObject class
Yang Cheng Fu
ChengFu.Yang at gameloft.com
Mon Mar 10 07:26:15 CET 2008
Hello Chaos,
Thanks a lot!
-------
YANG ChengFu
Unix Administrator
Gameloft -- Global Network Services (GNS)
* mailto:chengfu.yang at gameloft.com
* +86(10)8260-7783 ext.8221
________________________________
From: Chaos Eternal [mailto:chaoseternal at gmail.com]
Sent: Monday, March 10, 2008 2:10 PM
To: Yang Cheng Fu
Cc: python-ldap-dev at lists.sourceforge.net
Subject: Re: how to write filter argumnt for search function of LDAPObject class
##here comes the translation:
I'm using python-ldap to access Windows Active Directory, but I don't know howto write the 'filter' parameter in the function search of LDAPObject. Based upon RFC4515, I want the filter paramter to be "(&(objectclass=organizationalUnit)(c=*))".
According to the manual, the proto-type of search function is:
search(base, scope[,filterstr='(objectclass=*)'[, attrlist=None [, attrsonly=0]]])
and there are some example in the manual:
('cn=fred*') and ('objectclass=*'), but i can't find a way to express "(&(objectclass=organizationalUnit)(c=*))",
Could anybody help me?
##end of translation
________________________________
From: Chaos Eternal [mailto:chaoseternal at gmail.com]
Sent: Monday, March 10, 2008 12:36 PM
To: Yang Cheng Fu
Cc: python-ldap-dev at lists.sourceforge.net
Subject: Re: how to write filter argumnt for search function of LDAPObject class
hi,
please write your question in chinese, i can help you translate it.
On Mon, Mar 10, 2008 at 12:45 PM, Yang Cheng Fu <ChengFu.Yang at gameloft.com> wrote:
Hi guys,
I am trying to access windows Active directory by using python-ldap, but I do not know how to write filter argument for search function.
search(base, scope [,filterstr='(objectClass=*)' [, attrlist=None [, attrsonly=0]]]).
For example: A filter sting which based on RFC4515 (http://www.faqs.org/rfcs/rfc4515.html) is "(&(objectclass=organizationalUnit)(c=*))". From the docs of python-ldap, the forms of the argument, ('cn=fred*') and ('objectClass=*') can be found.
I'd like to know how to write the sting of "(&(objectclass=organizationalUnit)(c=*))" for search function. I am not sure where it is enough to answer my question, if you need more information, just ask.
Thanks a lot
-------
YANG ChengFu
Unix Administrator
Gameloft -- Global Network Services (GNS)
* mailto:chengfu.yang at gameloft.com
* +86(10)8260-7783 ext.8221
--
This message has been scanned for viruses and
dangerous content by MailScanner <http://www.mailscanner.info/> , and is
believed to be clean.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
--
Best Regards
Chaos Eternal
--
This message has been scanned for viruses and
dangerous content by MailScanner <http://www.mailscanner.info/> , and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner <http://www.mailscanner.info/> , and is
believed to be clean.
--
Best Regards
Chaos Eternal
--
This message has been scanned for viruses and
dangerous content by MailScanner <http://www.mailscanner.info/> , and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20080310/cbdd9c94/attachment.html>
More information about the python-ldap
mailing list