From: Yang C. F. <Che...@ga...> - 2008-03-10 04:31:33
|
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:che...@ga... * +86(10)8260-7783 ext.8221 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
From: Chaos E. <cha...@gm...> - 2008-03-10 04:35:47
|
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 <Che...@ga...> 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:che...@ga... <che...@ga...>* > > *(* +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 > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > > -- Best Regards Chaos Eternal |
From: Yang C. F. <Che...@ga...> - 2008-03-10 04:45:56
|
我在用python-ldap来访问Windows Active directory, 但是不知道LDAPObject的search函数中的filter参数怎么写。我要写的参数是 "(&(objectclass=organizationalUnit)(c=*))"(基于RFC4515) search函数的格式如下: search(base, scope [,filterstr='(objectClass=*)' [, attrlist=None [, attrsonly=0]]]). 从python-ldap的文档中可以找到 ('cn=fred*')与('objectClass=*'),但是没有"(&(objectclass=organizationalUnit)(c=*))"的写法。 我是想知道filter, "(&(objectclass=organizationalUnit)(c=*))", 在search函数中怎么写? 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:che...@ga... * +86(10)8260-7783 ext.8221 ________________________________ From: Chaos Eternal [mailto:cha...@gm...] Sent: Monday, March 10, 2008 12:36 PM To: Yang Cheng Fu Cc: pyt...@li... 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 <Che...@ga...> 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:che...@ga... * +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 Pyt...@li... 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, and is believed to be clean. |
From: Chaos E. <cha...@gm...> - 2008-03-10 06:10:22
|
##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 2008/3/10 Yang Cheng Fu <Che...@ga...>: > 我在用python-ldap来访问Windows Active directory, 但是不知道LDAPObject的search函数中的 > filter参数怎么写。我要写的参数是 > > "(&(objectclass=organizationalUnit)(c=*))"(基于RFC4515) > > > > search函数的格式如下: > > search(base, scope [,filterstr='(objectClass=*)' [, attrlist=None [, > attrsonly=0]]]). > > > > 从python-ldap的文档中可以找到 ('cn=fred*')与('objectClass=*'),但是没有 > "(&(objectclass=organizationalUnit)(c=*))"的写法。 > > > > 我是想知道filter, "(&(objectclass=organizationalUnit)(c=*))", 在search函数中怎么写? > > > > 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:che...@ga... <che...@ga...>* > > *(* +86(10)8260-7783 ext.8221 > ------------------------------ > > *From:* Chaos Eternal [mailto:cha...@gm...] > *Sent:* Monday, March 10, 2008 12:36 PM > *To:* Yang Cheng Fu > *Cc:* pyt...@li... > *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 <Che...@ga...> > 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:che...@ga... <che...@ga...>* > > *(* +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 > Pyt...@li... > 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 |
From: Yang C. F. <Che...@ga...> - 2008-03-10 06:12:39
|
Hello Chaos, Thanks a lot! ------- YANG ChengFu Unix Administrator Gameloft -- Global Network Services (GNS) * mailto:che...@ga... * +86(10)8260-7783 ext.8221 ________________________________ From: Chaos Eternal [mailto:cha...@gm...] Sent: Monday, March 10, 2008 2:10 PM To: Yang Cheng Fu Cc: pyt...@li... 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:cha...@gm...] Sent: Monday, March 10, 2008 12:36 PM To: Yang Cheng Fu Cc: pyt...@li... 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 <Che...@ga...> 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:che...@ga... * +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 Pyt...@li... 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. |
From: Michael S. <mi...@st...> - 2008-03-10 08:11:14
|
Yang Cheng Fu wrote: > > 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. From http://python-ldap.sourceforge.net/doc/python-ldap/ldap-objects.html: --------------------------- snip --------------------------- The filterstr argument is a string representation of the filter to apply in the search. See Also: RFC 4515, Lightweight Directory Access Protocol (LDAP): String Representation of Search Filters. --------------------------- snip --------------------------- > 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=*))". Yupp. That's exactly the string you have to pass to method search() and its derivates as argument filterstr. > From the docs of > python-ldap, the forms of the argument, ('cn=fred*') and > ('objectClass=*') can be found. Ouch! The example filterstr values on http://python-ldap.sourceforge.net/doc/python-ldap/ldap-example.html are simply typos. Sorry for that. Ciao, Michael. |
From: Yang C. F. <Che...@ga...> - 2008-03-10 08:14:52
|
Hello Michael, Thanks for your help. ------- YANG ChengFu Unix Administrator Gameloft -- Global Network Services (GNS) * mailto:che...@ga... * +86(10)8260-7783 ext.8221 -----Original Message----- From: Michael Ströder [mailto:mi...@st...] Sent: Monday, March 10, 2008 4:11 PM To: Yang Cheng Fu Cc: pyt...@li... Subject: Re: how to write filter argumnt for search function of LDAPObject class Yang Cheng Fu wrote: > > 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. From http://python-ldap.sourceforge.net/doc/python-ldap/ldap-objects.html: --------------------------- snip --------------------------- The filterstr argument is a string representation of the filter to apply in the search. See Also: RFC 4515, Lightweight Directory Access Protocol (LDAP): String Representation of Search Filters. --------------------------- snip --------------------------- > 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=*))". Yupp. That's exactly the string you have to pass to method search() and its derivates as argument filterstr. > From the docs of > python-ldap, the forms of the argument, ('cn=fred*') and > ('objectClass=*') can be found. Ouch! The example filterstr values on http://python-ldap.sourceforge.net/doc/python-ldap/ldap-example.html are simply typos. Sorry for that. Ciao, Michael. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
From: Michael S. <mi...@st...> - 2008-03-10 08:18:44
|
Yang Cheng Fu wrote: > > Thanks for your help. Thanks for finding a bug in the docs. Ciao, Michael. |