[jitsi-dev] LDAP contact search


#1

Hi,

I'm modifying the LDAP contact search method in order to filter out inactive/disabled domain users.
At least in MS Active Directory this is done by ignoring users who have the attribute
userAccountControl=514

So I modified:

impl.ldap.LdapDirectoryImpl.buildSearchFilter()

when searching for the string "vieri" searchFilter.toString() yields:

(&
(!userAccountControl=514)
(|
(uid=*vieri*)(gn=*vieri*)(sn=*vieri*)(cn=*vieri*)(givenname=*vieri*)(surname=*vieri*)(commonname=*vieri*)(displayName=*vieri*)(mail=*vieri*)(ipPhone=*vieri*)
)
)

However, I don't get any results.

I'm not fluent in LDAP query formats. I used LDAP explorer and saw that cn=vieri exists and that it's userAccountControl is != 514.

Is there anything wrong with the syntax?

Thanks,

Vieri


#2

Never mind. I'm answering myself.
(&
(!(userAccountControl=514))
(|
(uid=*vieri*)(gn=*vieri*)(sn=*vieri*)(cn=*vieri*)(givenname=*vieri*)(surname=*vieri*)(commonname=*vieri*)(displayName=*vieri*)(mail=*vieri*)(ipPhone=*vieri*)
)
)

ยทยทยท

--- On Mon, 7/9/12, Vieri <rentorbuy@yahoo.com> wrote:

Hi,

I'm modifying the LDAP contact search method in order to
filter out inactive/disabled domain users.
At least in MS Active Directory this is done by ignoring
users who have the attribute
userAccountControl=514

So I modified:

impl.ldap.LdapDirectoryImpl.buildSearchFilter()

when searching for the string "vieri"
searchFilter.toString() yields:

(&
(!userAccountControl=514)
(|
(uid=*vieri*)(gn=*vieri*)(sn=*vieri*)(cn=*vieri*)(givenname=*vieri*)(surname=*vieri*)(commonname=*vieri*)(displayName=*vieri*)(mail=*vieri*)(ipPhone=*vieri*)
)
)

However, I don't get any results.

I'm not fluent in LDAP query formats. I used LDAP explorer
and saw that cn=vieri exists and that it's
userAccountControl is != 514.

Is there anything wrong with the syntax?

Thanks,

Vieri