joeware - never stop exploring... :)

Information about joeware mixed with wild and crazy opinions...

Fun update for AdMod… Alternate working title, long overdue update for AdMod…

by @ 8:45 am on 8/2/2009. Filed under tech

This is an update I just added this week to AdMod that people may be interested in… Nope, sorry no scheduled release date though.

 

[Sat 08/01/2009 14:14:22.31]
F:\Dev\Current\CPP\AdMod\Debug>adfind -e -default -f name=admod_test_group member

AdFind V01.40.00cpp Joe Richards (joe@joeware.net) February 2009

Using server: TEST-DC1.test.loc:389
Directory: Windows Server 2003
Base DN: DC=test,DC=loc

dn:CN=admod_test_group,OU=admod_test,OU=TestOU,DC=test,DC=loc

1 Objects returned

[Sat 08/01/2009 14:17:25.00]
F:\Dev\Current\CPP\AdMod\Debug>adfind -e -default -rb ou=admod_test,ou=testou -f objectclass=user -dsq |admod -e -stdinadd member -b CN=admod_test_group,ou=admod_test,OU=TestOU,DC=test,DC=loc

AdMod V01.12.00cpp ##BETA## Joe Richards (joe@joeware.net) July 2009

DN Count: 1
Using server: TEST-DC1.test.loc:389
Directory: Windows Server 2003

Modifying specified objects…
   DN: CN=admod_test_group,ou=admod_test,OU=TestOU,DC=test,DC=loc…

The command completed successfully

[Sat 08/01/2009 14:18:52.78]
F:\Dev\Current\CPP\AdMod\Debug>adfind -e -default -f name=admod_test_group member

AdFind V01.40.00cpp Joe Richards (joe@joeware.net) February 2009

Using server: TEST-DC1.test.loc:389
Directory: Windows Server 2003
Base DN: DC=test,DC=loc

dn:CN=admod_test_group,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testusera_4,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testusera_3,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testusera_2,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testusera_1,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testusera_0,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testuser_4,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testuser_3,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testuser_2,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testuser_1,OU=admod_test,OU=TestOU,DC=test,DC=loc
>member: CN=testuser_0,OU=admod_test,OU=TestOU,DC=test,DC=loc

1 Objects returned

So what you are seeing is the results of one query for users being slapped into the group membership of a specified group. The parameterization is still not as clean as I want but cleaner than the ideas I had before. I may change it around a little again. But the base functionality is now in there.

There are obviously some other things in there, like with AdFind, I switched the compiler to a the latest CodeGear C++ Builder 2009 compiler which has results in a smaller binary and faster execution. I have also added the ability to updated security descriptors which is a long time requested update. It isn’t at the “cool” stage yet though, it is still kind of clunky so I am tweaking that and have some ideas of some other cool things to do with it to make it very useful. Also on the stdin redirect piece I had several requests to add some DN validation so working on adding that in. It will slow things down a hair but it will be better than trying to do work against improperly formed DNs.

Other changes in there and still coming.

Rating 3.00 out of 5

One Response to “Fun update for AdMod… Alternate working title, long overdue update for AdMod…”

  1. djimi says:

    I’m not a huge believer in synchronicity, but this is almost exactly what I was trying to do today. I use a few global security groups that contain computer objects for scripting against with group policies and I was trying to figure an easy way to move a couple hundred machines in this group.

    Is there a current method with adfind / admod perhaps via -csv ? This is what I tried (one line):

    >adfind -b “ou=machines,dc=testdc,dc=com” -f “&(objectclass=computer)(name=testmachine*))” dn -dsq | admod -unsafe -b “cn=new_group,ou=computer groups,ou=groups,ou=groups,dc=testdc,dc=com” member:++:{(dn}}

    but it returns an “Unwilling to perform” problem 5003 (WILL_NOT_PERFORM). So I guess I should say, “Thanks in advance”. As always, the coolest command line tools ever

[joeware – never stop exploring… :) is proudly powered by WordPress.]