Configure a single built-in, file-based repository in a new configuration under federated repositories using wsadmin
We can use the Jython or Jacl scripting language with wsadmin.sh to configure a single built-in, file-based repository in a new configuration under federated repositories. The file-based user registry file, fileRegistry.xml, is located in:
Portal: /opt1/IBM/WebSphere/profiles/wp_profile/config/cells/dmgrCell01/fileRegistry.xml
- Dmgr: /opt1/IBM/WebSphere/AppServer/profiles/dmgr01/config/cells/dmgrCell01/fileRegistry.xml
Configure file-based repository
- Start wsadmin.sh scripting tool.
- Create fileRegistry.xml.
If the file already exists, this step only performs an add of the user to registry.
Jython AdminTask.addFileRegistryAccount('-userId username -password userpass') Jacl $AdminTask addFileRegistryAccount {-userId username -password userpass}
- Update security.xml to enable administrative security, set the activeUserRegistry to use federated repositories, and update the primaryAdmin and its password.
Jython:
AdminTask applyWizardSettings('-secureApps false -secureLocalResources false -userRegistryType WIMUserRegistry -customRegistryClass com.ibm.ws.wim.registry.WIMUserRegistry -adminName isoet01s01 -adminPassword oets01')Using Jacl:
$AdminTask applyWizardSettings {-secureApps false -secureLocalResources false -userRegistryType WIMUserRegistry -customRegistryClass com.ibm.ws.wim.registry.WIMUserRegistry -adminName isoet01s01 -adminPassword oets01}For more information on the applyWizardSettings command, see the documentation about the WizardCommands (AdminTask).
- Save the configuration changes. Enter the following commands to save the new configuration and close wsadmin.sh:
Jython:
AdminConfig.save()
Jacl:
$AdminConfig save
- Restart the application server.
Subtopics
- FileRegistryCommands (AdminTask)
Federated repositories provides a file registry. Use the commands in the FileRegistryCommands command group to administer the file registry .
Related information:
WizardCommands (AdminTask)