Filter to search only objects with "user" in the AdsPath

Filter to search only objects with "user" in the AdsPath

Post by Sve » Sat, 03 Aug 2002 21:41:33



Hi NG,

Problem: To speed up searches through many OU's I want to search only
cn's in ou's named "users" in the tree.
But the following filter doesn't work:

strFilter = "(&(objectClass=User)
  (objectCategory=person)
  (adspath=*users*)
  (|(cn=*" & strSearchMe & "*)
  (sAMaccountname=" & strSearchMe & "*)))"

Is it not possible to use adspath or parent in filter definitions?

Thanks for any help,

Sven

 
 
 

Filter to search only objects with "user" in the AdsPath

Post by Richard Muelle » Sun, 04 Aug 2002 01:08:12


I found I could not search for substrings of AdsPath or
DistinguishedName. I don't think AdsPath can be searched
at all. However, wouldn't the fasted search be simply
(note, I added another * in the string):

strFilter = "(|(cn=*" & strSearchMe & "*)
  (sAMaccountname=*" & strSearchMe & "*))"

You still search the same number of objects either way,
but less work is done checking each. Or am I wrong in
this? The only downside is that you might return some
groups - I'm assuming you aren't sure of the name.

Richard

Quote:>-----Original Message-----
>Hi NG,

>Problem: To speed up searches through many OU's I want to
search only
>cn's in ou's named "users" in the tree.
>But the following filter doesn't work:

>strFilter = "(&(objectClass=User)
>  (objectCategory=person)
>  (adspath=*users*)
>  (|(cn=*" & strSearchMe & "*)
>  (sAMaccountname=" & strSearchMe & "*)))"

>Is it not possible to use adspath or parent in filter
definitions?

>Thanks for any help,

>Sven
>.


 
 
 

1. Problems with special characters like ("?","ΓΌ","?","?",aso.)

Hi

I use Samba 2.0.4b.
When I copy a file with a filename including a special
character from a win95 machine to my linux server, I dont find the special
characters any more. They have changed to "_" or something like that.

What can I do?
Do I have to write something special in the smb.conf?

Cya
   Markus

PGBP (PrettyGoodBlubberPrivacy) V9.9478239jd2n38943
----
dslktj3reio598uterdghnv897re7thj5258934uteretpjeriotjergmnfdg9834t34terehwjkrwq
ejrklejwr98u5r8934nf3nr04n58934vn5534n2c5345m493056xk05,29035734256nr4k3985u4t8
g45t70,df5?.54?5345934+534?5634685356834?tli34290571383rfhbjksdbhfztf4567vse
kdfvqkurzfj438rtjifm3409tmk3409tf3490jt43095j23423p4k2390423i409234k23904kkdfks
...
Code verified!
----

2. Cannot get computers on one NT domain to see users from the win2k domain

3. changing default share "users" to "users$"

4. Questions about "bogon" ACL entries to be added

5. Lock down "Shut down" and "Restart" for users

6. Working with the RBN_CHEVRONPUSHED notification.

7. Modifying A User "Password" "Deleting"

8. Best emulator

9. default permissions for the "company" and "users shared folder"

10. "Server=domain" and "add user script": How to know group?

11. Unwanted subfolders named "Desktop", ".kde" auto created in Win98, Winnt user folders

12. How to "normalize" IADs.ADsPath

13. Setting "memberOf" attribute of the User Object with LDAP