SV: [Zope] User's list using LDAPLoginAdapter

Jens Vagelpohl jens@zope.com
Mon, 15 Oct 2001 07:40:16 -0400


magnus,

looking at the search i noticed that you're looking for 
'SAMAccountName=magnus'. if the attribute "SAMAccountName" contains the 
"username" that is used to log in you will have to do the following:

- go to the LDAPSchema tab and add SAMAccountName to the list of defined 
attributes
- go to the Configure tab and select SAMAccountName as the Login Attribute

you can check the rest of the configuration by viewing the "Caches" tab, 
which should give you a list of available groups (if not you either have 
no groups defined or the group base DN setting is wrong) and then on the 
"Search" tab you should be able to search for SAMAccountName 'magnus" and 
find your record. if that fails then your users base DN setting might be 
wrong.

jens




On Monday, October 15, 2001, at 01:56 , Magnus Heino (Rivermen) wrote:

>
>> 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