Modify advanced LDAP settings via jython script - Websphere

This is a discussion on Modify advanced LDAP settings via jython script - Websphere ; Hi everyone. I'm writing a jython script to automate global security, and I'm stuck at the Advanced LDAP properties where the User Filter, Group Filter, User ID map, Group ID map, and Group member ID map are located. Does anyone ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Modify advanced LDAP settings via jython script

  1. Modify advanced LDAP settings via jython script

    Hi everyone.



    I'm writing a jython script to automate global security, and I'm stuck at the Advanced LDAP properties where the User Filter, Group Filter, User ID map, Group ID map, and Group member ID map are located.



    Does anyone know what the syntax is to modify these properties?



    If I do an AdminConfig.attributes('LDAPUserRegistry'), I get the attributes of the LDAPUserRegistry and there is one called "properties Property(TypedProperty)*"



    I've tried using this in a variable however, I get an error when I try to modify the LDAPUserRegistryID that I've already obtained.



    testAttr = [["properties",[[

    AdminConfig.modify(ldapUserRegistryId,testAttr)



    I've tried LDAPUserFilter, and ldapUserFilter. Neither work either. The error I get is below.



    WASX7080E: Invalid attributes specified for type "Property" -- "Property(userFilter)"



    Thanks for any help.

  2. Re: Modify advanced LDAP settings via jython script

    You are looking for a wrong object, its not LDAPUserFilter or ldapUserFilter. It is LDAPSearchFilter. Here is the code snippet.



    attrib = []

    attrib.append()

    attrib.append()

    attrib.append()

    attrib.append()

    attrib.append()

    attrib.append()

    attrib.append()



    ldapSearchFilter = AdminConfig.list("LDAPSearchFilter" )

    AdminConfig.modify(ldapSearchFilter, attrib )

    AdminConfig.save( )



    Thanks

    Anant

  3. Re: Modify advanced LDAP settings via jython script

    Thanks Anant, that was exactly what I was looking for.



    Cheers.

+ Reply to Thread