SV: [Zope] User's list using LDAPLoginAdapter

Magnus Heino (Rivermen) magnus.heino@rivermen.se
Mon, 15 Oct 2001 07:56:34 +0200


> like i said in a previous email, i have only tested the 
> software against 
> standards-compliant LDAP servers that i personally have 
> access to. i don't 
> have any access to active directory (i refuse to run windoze, 
> anyway) so i 
> cannot guarantee that the product will work with active directory.

This code/output works:

[magnus@bombardier magnus]$ cat ldaptest.py
import ldap
from pprint import pprint
l=ldap.open('ignalina')
l.simple_bind_s('CN=Magnus Heino,OU=Employees,OU=Rivernet Users,
DC=rivernet,DC=rivermen,DC=se', 'passwd')
res = l.search_s('OU=Employees,OU=Rivernet
Users,DC=rivernet,DC=rivermen,DC=se', ldap.SCOPE_SUBTREE,
'sAMAccountName=magnus', ['sn', 'givenName', 'mail'])

pprint(res)
[magnus@bombardier magnus]$ python ldaptest.py
[('CN=Magnus Heino,OU=Employees,OU=Rivernet
Users,DC=rivernet,DC=rivermen,DC=se',
  {'givenName': ['Magnus'],
   'mail': ['magnus.heino@rivermen.se'],
   'sn': ['Heino']})]
[magnus@bombardier magnus]$

But I still can't figure out how to config LDAPLoginAdapter. Probably
because I don't know LDAP enough.

Help, anyone?

Are there any good books on LDAP around?

/Magnus