Hi,
I am very new to LDAP and I wanted to know how to authenticate a user based on which group they belong in. I am trying to setup an LDAP server with the following structure: (On ubuntu server 9.10)
dn: dc=example,dc=com
objectClass: top
objectClass: dcObject
objectclass: organization
o: Example Organization
dc: Example
dn: cn=admin,dc=example,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: secret
dn: ou=people,dc=example,dc=com
objectClass: organizationalUnit
ou: people
dn: ou=groups,dc=example,dc=com
objectClass: organizationalUnit
ou: groups
dn: cn=test,ou=people,dc=example,dc=com
objectClass: inetOrgPerson
uid: test
sn: test
givenName: test
cn: test test
displayName: test test
userPassword: mypass
mail: test@example.com
title: System Administrator
dn: cn=developers,ou=groups,dc=example,dc=com
objectClass: groupOfNames
cn: developers
member: cn=test,ou=people,dc=example,dc=com
I have followed the guide from here until populating the database. https://help.ubuntu.com/11.04/server...ap-server.html
The LDAP server sets up perfectly and I can access it using Apache directory studio but when I try the following filter (uid=test), I get a hit back. But when I do (&(uid=test)(memberOf=cn=developers,ou=groups,dc=e xample,dc=com)) I don't get any hits. I am using the following filter in bugzilla to authenticate valid users from developers group:
(memberof=cn=developers,ou=groups,dc=example,dc=co m) which gets AND by the LDAPloginattribute of "uid". If I don't specify the attribute then I can login with user test in bugzilla, but with the filter it fails.
Can someone please help me?
Bookmarks