Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

possible to enumerate groups with csvde?

Status
Not open for further replies.

kokser

Programmer
Sep 25, 2009
90
DK
Hello :)

Currently I am running this command:

Code:
csvde -f test.csv -r "(&(objectClass="User")(objectCategory="person"))" -l "name, samaccountname, mail, homedirectory, homedrive, scriptPath"
Is there a way to also enumerate the groups (and OU's?) that every member is in?
 
ALso, is it possible to make it NOT enumerate DN?
 
Oh, and is it possible to only enumerate enabled accounts? Or just exclude disabled?
 
Or alternatively!

Make another csvde where objectclass is group. Easy enough. But I can't figure out how to enumerate the members of every group and OU.
 
Finally figured out how to do it. HOWEVER, it also lists computers now?? I can't quite figure out how to not enumerate them.

Working code:
Code:
csvde -f test.csv -r "(|(objectclass="group")(objectclass="user"))
This will also enumerate computers for some reason.

What I've tried:
Code:
csvde -f test.csv -r "(!(|(objectclass="group")(objectclass="user"))(objectclass="computer"))"
and some variations
Code:
csvde -f test.csv -r "(!(|(objectclass="group")(objectclass="user"))(objectclass!="computer"))"
Code:
csvde -f test.csv -r "(&(|(objectclass="group")(objectclass="user"))(objectclass!="computer"))"

And none of them work. Any help appreciated :)
 
Figured it out again :p

Code:
csvde -f test.csv -r "(&(|(objectclass="group")(objectclass0"user"))(!objectclass="computer"))"

Now I just need hlep to figure out how I can enumerate the members of every group!
 
or alternatively, enumerate the groups that every member is in.
 
I changed to ldifde instead now.
Code:
ldifde -f test.txt -r objectclass=group -l "name, member"
How come it also enumerates DN and changetype?
 
Forget that, I went back to excel, but still with ldifde.
Code:
ldifde -f test2.csv -r objectclass0group -l "member"
The output is just a bit weird (same thing happens in .txt)
See attachment
 
 http://i33.tinypic.com/2saz0wg.png
I decided to go back to txt.

This is what I've got so far:
Code:
H:\>ldifde -f test2.txt -d "OU=RKO_Test, DC=AdvizorIT, DC=local" -r objectclass=user -l "name, initials, mail, memberof, homedrive, scriptpath, homedirectory"
But due to unknown reasons, it outputs something called CHANGETYPE and DN.
Code:
dn: CN=test,OU=tes_Test,DC=test,DC=local
changetype: add
initials: test
memberOf: CN=test_Test,OU=test_Test,DC=test, DC=local
name: test test
homeDirectory: \\test\test$\test
homeDrive: V:
scriptPath: testscript
mail: test@test.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top