WAS v8.5 > Script the application serving environment (wsadmin) > Scripting for security > Configure security with scripting > Configure multiple security domains using scripting

Remove resources from security domains using scripting

Use this topic to remove management resources from security domains. Remove all resources from a security domain before deleting the security domain from your configuration.

Users assigned to the administrator role can configure security domains. Verify that we have the appropriate administrative role before configuring security domains.

  1. Launch the wsadmin scripting tool using the Jython scripting language. See the Starting the wsadmin scripting client article for more information.

  2. Determine the security domain to edit.

    Use the listSecurityDomains command to view a list of security domains in your configuration. Specify true for the optional -listDescription parameter to list the description for each security domain, as the following Jython example demonstrates:

      print AdminTask.listSecurityDomains('-listDescription true')

    The command returns the following example output:

      myDomain - security domain for administrative applications domain2 - new domain for cell123
  3. Verify the management resources assigned to the security domain.

    Use the listResourcesInSecurityDomain command to view a list of resources that are mapped to the security domain of interest, as the following Jython example demonstrates:

      print AdminTask.listResourcesInSecurityDomain('-securityDomainName domain2')

    The command returns the following example output:

      "Cell=myhostCell01"
  4. Remove the resource from the security domain.

    Use the removeResourceFromSecurityDomain command to remove a management resource from the security domain. For example, use the following Jython command to remove the Cell01 cell resource from the domain2 security domain:

      AdminTask.removeResourceFromSecurityDomain('-securityDomainName domain2 -resourceName Cell=myhostCell01')

  5. Save your configuration changes.

    Use the following command example to save your configuration changes:

Restart each management resource that you removed from a security domain.


Related


Manage servers and nodes with scripting
Start the wsadmin scripting client using wsadmin.sh
Remove security domains using scripting


+

Search Tips   |   Advanced Search