[erlang-questions] Question about eldap - substring filter

Michael Loftis mloftis@REDACTED
Fri Jul 19 22:13:50 CEST 2013


Can't offer any specific eldap advice, but, it's very likely that your
LDAP Schema won't even allow a substring match there as the normal
posixAccount schema will usually only specify equality matches.
You'll need to change your LDAP server schema in order to allow a
substring match in addition to equality matches.

On Fri, Jul 19, 2013 at 11:54 AM, Matthew Simarmata
<matthew.simarmata@REDACTED> wrote:
> Hi,
>
> I made following eldap search
> eldap:search(S, [Base, Scope, {filter, eldap:equalityMatch("uid",
> "matthew")}]).
>
> and got below result:
>
> {ok,{eldap_search_result,
>         [{eldap_entry,
>              "uid=matthew,ou=Support,ou=People,dc=maxcrc,dc=com",
>              [{"objectClass",["posixAccount","top","inetOrgPerson"]},
>               {"gidNumber",["0"]},
>               {"givenName",["matthew"]},
>               {"sn",["Simarmata"]},
>               {"displayName",["matthew Simarmata"]},
>               {"uid",["matthew"]},
>               {"homeDirectory",["/home/matthew"]},
>               {"loginShell",["matthew"]},
>               {"cn",["matthew Simarmata"]},
>               {"uidNumber",["64152"]}]}],
>         []}}
>
>
> I want to filter based on substring on 'homeDirectory', and submit following
> eldap search:
>
> eldap:search(S, [Base, Scope, {filter, eldap:substrings("homeDirectory",
> [{any,"matthew"}])}, {attributes, ["homeDirectory"]}]).
>
> However I got empty result.
>
> I need help please?
>
> Thanks,
> MS
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 

"Genius might be described as a supreme capacity for getting its possessors
into trouble of all kinds."
-- Samuel Butler



More information about the erlang-questions mailing list