Re: Reading groups from LDAP

2008-06-19 Thread Michael Ströder
Melita Mihaljevic wrote: > > > On Wed, Jun 18, 2008 at 7:17 PM, Michael Ströder <[EMAIL PROTECTED] > > wrote: > > Michael Ströder wrote: > > The user enters some user name. During login you have to use a > configurable search filter for searching t

Re: Reading groups from LDAP

2008-06-19 Thread Melita Mihaljevic
On Wed, Jun 18, 2008 at 7:17 PM, Michael Ströder <[EMAIL PROTECTED]> wrote: > Michael Ströder wrote: > >> The user enters some user name. During login you have to use a >> configurable search filter for searching the user's entry. >> >> Something like: >> user_search_filter_template = '(|(uid=%s)(

Re: Reading groups from LDAP

2008-06-18 Thread Michael Ströder
Michael Ströder wrote: > The user enters some user name. During login you have to use a > configurable search filter for searching the user's entry. > > Something like: > user_search_filter_template = '(|(uid=%s)(sAMAccountName=%s))' > > An then replace %s with what the user entered as user name

Re: Reading groups from LDAP

2008-06-18 Thread Michael Ströder
Melita Mihaljevic wrote: > On Wed, Jun 18, 2008 at 5:58 PM, Michael Ströder <[EMAIL PROTECTED] > > wrote: > Michael Ströder wrote: > Melita Mihaljevic wrote: > My search filter is (it's all in one line): > search_filter = >

Re: Reading groups from LDAP

2008-06-18 Thread Melita Mihaljevic
On Wed, Jun 18, 2008 at 5:58 PM, Michael Ströder <[EMAIL PROTECTED]> wrote: > Michael Ströder wrote: > >> Melita Mihaljevic wrote: >> >>> >>> My search filter is (it's all in one line): >>> search_filter = >>> '(|(&(objectClass=groupOfUniqueNames)(uniqueMember=uid=usera*)) >>> (&(objectClass=group

Re: Reading groups from LDAP

2008-06-18 Thread Michael Ströder
Michael Ströder wrote: > Melita Mihaljevic wrote: >> >> My search filter is (it's all in one line): >> search_filter = >> '(|(&(objectClass=groupOfUniqueNames)(uniqueMember=uid=usera*)) >> (&(objectClass=groupOfNames)(member=uid=usera*)) >> (&(objectClass=posixGroup)(memberUid=usera*)))' > > Why d

Re: Reading groups from LDAP

2008-06-18 Thread Michael Ströder
Melita Mihaljevic wrote: > > My search filter is (it's all in one line): > search_filter = > '(|(&(objectClass=groupOfUniqueNames)(uniqueMember=uid=usera*)) > (&(objectClass=groupOfNames)(member=uid=usera*)) > (&(objectClass=posixGroup)(memberUid=usera*)))' Why do you want to do wildcard searches

Re: Reading groups from LDAP

2008-06-18 Thread Melita Mihaljevic
On Wed, Jun 18, 2008 at 11:15 AM, Michael Ströder <[EMAIL PROTECTED]> wrote: > > Example of a filter generated by web2ldap (normally everything in one line, > broke up here for readability): > > (| > (&(objectClass=organizationalRole)(roleOccupant=cn=michael > str\C3\B6der,ou=private,dc=stroeder,

Re: Reading groups from LDAP

2008-06-18 Thread Michael Ströder
Melita Mihaljevic wrote: > Hi, > I'm wondering which is the generic way to search for groups in LDAP. > I used: search_groups = lo.search_st(base_dn, ldap.SCOPE_SUBTREE, > '(ou=Group)') The filter (ou=Group) does not make sense to me. You're probably mixing this with the search root. 1. Bear in

Reading groups from LDAP

2008-06-18 Thread Melita Mihaljevic
Hi, I'm wondering which is the generic way to search for groups in LDAP. I used: search_groups = lo.search_st(base_dn, ldap.SCOPE_SUBTREE, '(ou=Group)') Is there a better way? Also I need to get a groups that a certain user is a member of. Any ideas how to read it? Thank you very much for all idea