Anonymous_User Absent Member.
Absent Member.
451 views

groupMembership question

Hello!
I'm trying to use the ldap classes for Java. I have modified the given
example Search.java in novell-jldap-devel kit in order to get those users'
email list who belong to a specific group.
My great problem is that I can't figure out, how to add the groupMembership
I'm looking for to the search filter.
In this case: groupMembership: cn=group1_users,ou=DD,ou=private,ou=GW,o=GDIR
I did the following:
String searchBase = "ou=GW,o=GDIR";
String searchFilter = ????
String[] attrList = new String[]{"mail"}
lc.search(...)

I read the documentation and other sources but I don't get any result at all.
Please help me figure it out this basic question!
thanks in advance,
nagybaly
Labels (1)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: groupMembership question

You need to make sure that you pass the entire group DN into the search
filter.

Like any other DN attribute, you cannot utilize substring seaches, since the
schema only supports the equality operation.

Dir you try something like
searchFilter = (& (objectClass=organizationalPerson)(
groupMembership=cn=group1_users,ou=DD,ou=private,ou=GW,o=GDIR ))

Wolfgang

<na@na.hu> wrote in message
news:oXtwh.13203$Sz4.1076@prv-forum2.provo.novell.com...
> Hello!
> I'm trying to use the ldap classes for Java. I have modified the given
> example Search.java in novell-jldap-devel kit in order to get those users'
> email list who belong to a specific group.
> My great problem is that I can't figure out, how to add the
> groupMembership
> I'm looking for to the search filter.
> In this case: groupMembership:
> cn=group1_users,ou=DD,ou=private,ou=GW,o=GDIR
> I did the following:
> String searchBase = "ou=GW,o=GDIR";
> String searchFilter = ????
> String[] attrList = new String[]{"mail"}
> lc.search(...)
>
> I read the documentation and other sources but I don't get any result at
> all.
> Please help me figure it out this basic question!
> thanks in advance,
> nagybaly



0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.