07-14-2020 12:18 PM
hi guys,
i was wondering if someone help to come with a filter for ldap. my client is a college. all the students' username are numbers (probably their student ID). employees got their username based on their first/lastname. all i need is a filter that can only import users who have username (sAMAccountName) which is not a number.
thanks a bunch.
vijay
Solved! Go to Solution.
07-16-2020 12:48 PM
There may be a more elegant way to construct this filter, but it worked for me. I created users with sAMAccountName that started with a letter and some that started with a number and the filter worked correctly.
(&(objectClass=user)(!(|(sAMAccountName=0*)(sAMAccountName=1*)(sAMAccountName=2*)(sAMAccountName=3*)(sAMAccountName=4*)(sAMAccountName=5*)(sAMAccountName=6*)(sAMAccountName=7*)(sAMAccountName=8*)(sAMAccountName=9*))))
Let me know if this works for you!
Maren
07-14-2020 11:49 PM
Hello,
Have you seen the following post?
https://community.cisco.com/t5/contact-center/cucm-ldap-custom-filters/td-p/2420321
Also the documentation is the following:
George
07-16-2020 12:48 PM
There may be a more elegant way to construct this filter, but it worked for me. I created users with sAMAccountName that started with a letter and some that started with a number and the filter worked correctly.
(&(objectClass=user)(!(|(sAMAccountName=0*)(sAMAccountName=1*)(sAMAccountName=2*)(sAMAccountName=3*)(sAMAccountName=4*)(sAMAccountName=5*)(sAMAccountName=6*)(sAMAccountName=7*)(sAMAccountName=8*)(sAMAccountName=9*))))
Let me know if this works for you!
Maren
07-18-2020 07:24 AM
that seems to be working. thank you so much..
04-29-2021 09:39 AM
hi Maren,
thanks for your help again with this ldap filter. It does work. however, now that we got lots of jabber users, the DC is going thru high resource utilization because of the filter. the client is a college with 100k user database. they only have 10 OUs with employees and that's what we need to scan for jabber contact resolution. more than 90% of user database is students and their username starts with a number and that's why i initially asked for your help to scan the top level domain for users and exclude username starts with number.
the high utilization is because of the size of database and this filter is applied on search base that points to top domain level.
now I am thinking of changing this filter so that it include student OUs. So the filter should be looking for users and excluding users from like 9 OUs which contains the students.
is that even possible to come up with the filter like that?
thank you.
vijay
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide