What is the best way to remove all members from a group in AD? The help for ldapmodify doesn't seem to support the ability to remove all members of a group.
I found an example of removing a particular dn using:
ldapmodify -h 127.0.0.1 -D "cn=admin" -w xxxx -f modStaticGrp.ldif
Where modStaticGrp.ldif contains:
dn: cn=group1, o=Your Company
changetype: modify
delete: member
member: cn=jeff, cn=tim, o=Your Company
I would like to have a bash script with ldapmodify running a command that removes all the users in a group. What would be the best way to accomplish this?