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

Re: Filter with '@' char doesn't work



> Dear All,
> 
> I have a problem with filter which contain '@' char.
> 
> no result found with this command :
> $ ldapsearch -D "cn=Administrator,dc=aaa,dc=com" -w test -b
> "dc=aaa,dc=com" uid=lukman@aaa.com

It would be really odd for the above uid to be valid.  More likely,
you want to use the filter "uid=lukman" and leave off @aaa.com.

> 
> And I manage to make it work with a silly way which I use it for demo
> only.
> $ ldapsearch -D "cn=Administrator,dc=aaa,dc=com" -w test -b
> "uid=lukman@aaa.com,dc=aaa,dc=com" uid=*
> 
> I know from ldapfilter.conf that '@' is used for mail filtering, and it
> just work fine if the filter is mail=lukman@aaa.com.
> 

Are you sure your dn is not "uid=lukman,dc=aaa,dc=com"?  Also, I'd suggest
making it a base search (add -s base), and change your filter to
"objectclass=*".  If you get "no such object", then for sure it does not
exist.

Randy