Last active
October 8, 2015 04:39
-
-
Save cowlike/3279114 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='com.unboundid', module='unboundid-ldapsdk', version='2.3.1') | |
import com.unboundid.ldap.sdk.* | |
def mr = new ModifyRequest('cn=jrandom,ou=accounts,dc=somewhere,dc=com', | |
[new Modification(ModificationType.REPLACE, 'msDS-UserAccountDisabled', 'TRUE'.bytes)]) | |
LDAPConnection.metaClass.modify = {ModifyRequest req -> println req; null} | |
LDAPConnection c = new LDAPConnection() | |
c.modify(mr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment