[python3-ldap] R: Development Question

Paul G. paul.list at isrcomputing.com
Mon Sep 23 15:33:57 CEST 2013


Hi Giovanni,

It worked. Thank you!



{   'description': 'success',
    'dn': '',
    'message': '',
    'referrals': None,
    'result': 0,
    'type': 'searchResDone'}
[   {   'attributes': {},


So the issue is with GET_ALL_INFO :)

Regards,
Paul

> On September 21, 2013 at 1:51 PM Python3-ldap <python3ldap at gmail.com> wrote:
> 
>  Hi Paul, I'm quite confident it will work on Novell eDirectory, actually I'm
> using it for developing and testing the library itself.
> 
>  Have a nice weekend,
>  Giovanni
> 
>  gc
> 
>  ---------------------------------------------
>  Da: Paul G. <mailto:paul.list at isrcomputing.com>
>  Inviato: ‎21/‎09/‎2013 16.56
>  A: python3ldap <mailto:python3ldap at gmail.com> ; python3-ldap at python.org
> <mailto:python3-ldap at python.org>
>  Oggetto: Re: [python3-ldap] Development Question
> 
>  Hi Giovanni,
> 
>  Thank you for your prompt response!
> 
>  It is Novell E-Directory LDAP server. I will check it on Monday and will get
> back to you with my results.
> 
>  Regards,
>  Paul
> 
>   > > On September 20, 2013 at 10:21 PM python3ldap <python3ldap at gmail.com>
>   > > wrote:
> > 
> >   Hello Paul,
> >   thanks for testing the python3-ldap client library!
> >   There is no specific extra debug information in the library for now, you
> > can check the ldap result message for each ldap operation inspecting the
> > c.result attribute.
> >   I've sligthly modified your script and it''s working for me:
> > 
> >   from ldap3 import Connection, Server
> >   from ldap3 import AUTH_SIMPLE, STRATEGY_SYNC, SEARCH_DEREFERENCE_ALWAYS,
> > SEARCH_SCOPE_WHOLE_SUBTREE, GET_NO_INFO
> >   import pprint
> >   LDAP_HOST = 'yourServer'
> >   LDAP_USER = 'yourUser'
> >   LDAP_PASS = 'yourPassword'
> >   s = Server(LDAP_HOST, port = 389, getInfo = GET_NO_INFO)
> >   c = Connection(s, autoBind = False, clientStrategy = STRATEGY_SYNC,
> > user=LDAP_USER, password=LDAP_PASS, authentication=AUTH_SIMPLE)
> >   c.open()
> >   print('Connection info:')
> >   print(c)
> >   c.bind()
> >   print('Bind result:')
> >   pprint.PrettyPrinter(indent=4).pprint(c.result)
> >   #print(<http://s.info> )
> >   result = c.search('o=hcc','(objectClass=*)', SEARCH_SCOPE_WHOLE_SUBTREE,
> > SEARCH_DEREFERENCE_ALWAYS, attributes = ['cn','ou','uid'])
> >   print('Search result:')
> >   pprint.PrettyPrinter(indent=4).pprint(c.result)
> >   print('Search response:')
> >   pprint.PrettyPrinter(indent=4).pprint(c.response)
> >   c.unbind()
> > 
> >   Please, substitute the LDAP_HOST, LDAP_USER and LDAP_PASSWORD with your
> > current values and send me back the output. You should get details for the
> > conection info, for the bind result, the search result and the search
> > response.
> >   I've remove the GET_ALL_INFO for now, because it adds a few search
> > operations at the bind phase and overrides the result from the bind
> > operation. You can add it back later wjem it's working.
> > 
> >   Can you tell me more on the client and the server platform you're using?
> > 
> >   Thanks,
> >   Giovanni
> > 
> >   Have fun,
> >   gc
> > 
> > 
> >   2013/9/20 Paul G. <paul.list at isrcomputing.com
> > <mailto:paul.list at isrcomputing.com> >
> >     > > >     Hi,
> > > 
> > >     I downloaded 'python3-ldap-0.6.0-beta' and tested it. It failed to
> > > work for me.
> > > 
> > > 
> > >     from ldap3 import connection, server
> > >     from ldap3 import AUTH_SIMPLE, STRATEGY_SYNC, STRATEGY_ASYNC_THREADED,
> > > SEARCH_DEREFERENCE_ALWAYS, SEARCH_SCOPE_WHOLE_SUBTREE, GET_ALL_INFO
> > >     import pprint
> > >     s = server.Server(LDAP_HOST, port = 389, getInfo = GET_ALL_INFO)
> > > 
> > >     c = connection.Connection(s, autoBind = True, clientStrategy =
> > > STRATEGY_SYNC, user=LDAP_USER, password=LDAP_PASS,
> > > authentication=AUTH_SIMPLE)
> > >     print(<http://s.info>)
> > >     result = c.search('o=hcc','(objectClass=*)',
> > > SEARCH_SCOPE_WHOLE_SUBTREE, SEARCH_DEREFERENCE_ALWAYS, attributes =
> > > ['cn','ou','uid']);
> > > 
> > >     pprint.PrettyPrinter(indent=4).pprint(c);
> > >     pprint.PrettyPrinter(indent=4).pprint(result);
> > >     c.unbind();
> > > 
> > >     It returns with:
> > > 
> > >     Connection(server=Server(host='XXXXX', port=389, ssl=False,
> > > getInfo=3), user='XXXXX', password='YYYYYY', autoBind=True, version=3,
> > > authentication=1, clientStrategy=0, autoReferrals=True)
> > > 
> > >     False
> > > 
> > > 
> > >     Is there a way to turn on extra debugging to see where the script is
> > > failing?
> > > 
> > >     Regards,
> > >     Paul G.
> > > 
> > >     _______________________________________________
> > >     python3-ldap mailing list
> > >     python3-ldap at python.org <mailto:python3-ldap at python.org>
> > >     <https://mail.python.org/mailman/listinfo/python3-ldap>
> > >   > > 
> >  > 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python3-ldap/attachments/20130923/ed7a3246/attachment.html>


More information about the python3-ldap mailing list