Pst... try a filter of
"(&(objectcategory=person)(objectclass=user)(samaccountname=*))". You will
still pick up trust accounts but will filter out computer accounts. Also putting
in the objectcategory should speed the search up a little. objectclass searches
are slow because the attribute is not indexed (by default though you can index
it if you want) and also objectclass is multivalued and many different objects
have user as one of the classes - such as computers.
To make sure you only get users (i.e. no trusts) you can
use the following search but it may slow the overall search down because it uses
a NOT and a tuple style search filter.
(&(objectcategory=person)(objectclass=user)(!(samaccountname=*$)))
Just for more info... Here is the objectclass attribute for
a computer
>objectClass: top
>objectClass: person
>objectClass: organizationalPerson
>objectClass: user
>objectClass: computer
>objectClass: person
>objectClass: organizationalPerson
>objectClass: user
>objectClass: computer
Here it is for a user
>objectClass: top
>objectClass: person
>objectClass: organizationalPerson
>objectClass: user
>objectClass: person
>objectClass: organizationalPerson
>objectClass: user
Here is objectcategory for a computer
>objectCategory:
CN=Computer,CN=Schema,CN=Configuration,DC=joe,DC=com
and for a user
objectCategory:
CN=Person,CN=Schema,CN=Configuration,DC=joe,DC=com
-------------
http://www.joeware.net (download joeware)
http://www.cafeshops.com/joewarenet (wear joeware)
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Celone, Mike
Sent: Thursday, March 18, 2004 4:59 PM
To: '[EMAIL PROTECTED]'
Subject: [ActiveDir] CSVDE Problem
I must be doing
something stupid that I can't seem to figure out. I'm trying to use CSVDE
to export all the users from our domain. Now whenever I run the program
and specify to only export user objects it exports everything on me! Here
the command line I am using:
csvde -f c:\file.csv
-d "dc=xx,dc=yyy,dc=com" -r "(objectClass=user)"
Shouldn't this
command only export user objects? For some reason it's exporting both
computer and user objects from the domain. What am I doing
wrong?
Mike Celone
Systems Specialist
Radio Frequency
Systems
v 203-630-3311 x1031
f 203-634-2027
m 203-537-2406
