Ldapsearch filter on DN component

Prashanth Sundaram <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <C7F34F23.184BB%[email protected]>
Hello All,

I am trying to write a program with some logical filters. I am not sure if
the syntax is wrong or the logic itself.

$mesg = $ldap->search( base => dc=domain,dc=com, filter =>
(&(&(uid=test)(ou:dn:=People))(&(cn=test)(ou:dn:=Group))), attr => ³*²)

Error: Bad filter

HELP: Can you verify if my filter is right? Also suggest alternate filter
you think might solve the purpose.

What I am trying to do?
For a given uid=test, check if the posixAccount exists in ou=people and also
check if the corresponding group is also present in ou=Group.
Return true when both user and group exists for uid=test. Else false.

Why so complex? Because the user accounts also have CN value which is
Firstname Lastname and it should not be checked against.


Thanks,
Prashanth
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.