I have updated the AdMod Beta again. My good friend Princess (Jorge) was very nice to ping me with an issue he was hitting in AdMod (both previous stable versions and beta) this last week and low and behold after testing I realized it was a bug. A bug in a very nasty portion of the CSV code. Those of you who recall, CSV functionality was never intended to be in AdMod (and AdFind). One night after a particularly awesome Summit and Directory Experts Conference I figured out how to hack CSV into the tools. However it was akin to how most companies used to build convertibles. They built a normal car, welded a couple of extra braces on and cut the top off. Slowly but surely I am slowly cleaning up this really bad code and unfortunately the bug Jorge hit was deep in the middle of some of the worst of it. Once I knew it was a bug, it took me another 4 hours to actually trace down WHERE the bug was. And I didn’t even figure it out while sitting in front of the computer. It was one of those things where you are off doing something completely disconnected and your mind wanders and the answers pops into your head. I love it when that happens. 🙂
Once the bug was found the fix was simple, obvious and solid and I was able to plug it in but there was a good period of time there that I was thinking I didn’t like Jorge very much. ;o)
Anyway, the upshot is that there is a new AdMod beta up on the website if you would like to download it. 🙂
Thanks to Jorge and everyone else that is testing the apps and sending me feedback, it is always appreciated and helps me make a better product for all of us.
http://www.joeware.net/downloads/beta/adfindmod_beta.zip
joe
hey joe,
I tried the EXPORT and the IMPORT script I had created, which use ADFIND/ADMOD, and I did not the see errors I experienced before. Works like a charm now! Thanks for the help!
Joe:
I saw the addition:
Ex19:
adfind -default -rb cn=users -f “objectclass=user” -dsq| admod -default -rb cn=theusers,cn=users -stdinadd member
Add all users in the user’s container to the theusers group.
I want to try this – but perhaps I’m confusing things (do I want objectclass to be computer or a group?):
+++++
adfind -b “cn=mycurrent_group,ou=computer groups,ou=groups,dc=mycorp,dc=com” -f “objectclass=computer” -dsq | admod -b “cn=my_new_comp_group,ou=computer groups,ou=groups,dc=mycorp,dc=com” -stdinadd member
+++++
Basically exchanging computer objects instead of user objects from your example. I do a lot of scripting that initiates on matching a member in a security group and doing something if that’s true.
But I think it’s just adding the DN to the new group, not the members.
Thanks again!
The first part is an adfind query to produce a list of quoted DNs that you want added. So any query that will produce that list is fine. Your query is looks like it is based on an individual group and then telling AdFind to return any objects that are computers. You won’t get anything that way. If you just want to dump the current members of a group and have those sucked into the new group the adfind query should look like
adfind -b groupdn -s base member -qlist
or
adfind -default -f name=groupname member -qlist
For example:
C:\temp\delete>adfind -e -default -f name=”domain admins” member -qlist
“CN=TestAdminClone,OU=Users,OU=TestOU,DC=test,DC=loc”
“CN=$joe,OU=Users,OU=My,DC=test,DC=loc”
“CN=Administrator,CN=Users,DC=test,DC=loc”