[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Check for existence of a group



On Tuesday 05 May 2009 07:41:18 Alex Chen wrote:
> I am new to LDAP so please bear with me if my question sounds too basic.
> I want to make sure if a group already exist in the directory before a
> member is allowed to be added.
> I guess the API to use would be ldap_search_s (I want to sue synchronous
> search).
> What kind of filter syntax should I use?

If you know the DN, then do a search with basedn of the DN of the group, with 
scope base, with filter (objectclass=*).