It's a question related to ldap not to web2py... Anyway this should work. Teste on openldap I can't try AD:
import ldap LDAP_URI = "ldap://127.0.0.1:389" SEARCH_BASE = "ou=users, dc=domain,dc=lan" QUERY = 'cn=*' try: l = ldap.initialize(LDAP_URI) l.protocol_version = ldap.VERSION3 search_scope = ldap.SCOPE_SUBTREE retrieve_attributes = None ldap_result_id = l.search( SEARCH_BASE, search_scope, QUERY, retrieve_attributes ) result_set = [] while 1: result_type, result_data = l.result(ldap_result_id, 0) if (result_data == []): break else: if result_type == ldap.RES_SEARCH_ENTRY: result_set.append(result_data) print result_data except ldap.LDAPError, e: print('LDAPError: %s.' % e) finally: l.unbind_s() On Thu, May 7, 2015 at 8:53 PM, Matheus Suffi <matheus.suff...@gmail.com> wrote: > Hello, > have an ActiveDirectory Server and, > I was wondering how to catch all user data and return the view , i can > connect normally , just need to know how to get all user data > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Massimiliano -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.