AdminTask 对象的 FileRegistryCommands 命令组
联合存储库提供文件注册表。使用 FileRegistryCommands 命令组中的命令来通过 wsadmin 工具管理文件注册表。
注: 如果对用户领域选中了“使用全局安全性设置”选项,或者选择了“全局联合存储库”选项作为指定域的领域类型,那么将对管理域的联合存储库执行用户和组管理命令。例如,如果对指定的域运行 createUser 命令,那么将在管理域中创建用户。但是,对域执行的配置更改将应用于特定于安全域的配置。
使用 FileRegistryCommands 组中的下列命令来修改联合存储库文件注册表:
addFileRegistryAccount 命令
addFileRegistryAccount 命令将帐户添加至文件注册表。在运行此命令以将新帐户保存至主存储库之后必须保存配置更改。
目标对象
无必需参数
- -userId
- 指定要添加至文件注册表的用户标识。(字符串,必需)
- -password
- 指定要添加至文件注册表的用户密码。(字符串,必需)
可选参数
- -securityDomainName
- 指定唯一地标识安全域的名称。如果未指定此参数,那么此命令将使用全局联合存储库。(字符串,可选)
- -parent
- 指定实体的父代。(字符串,可选)
返回值
此命令会返回一条指示该命令已成功运行的消息,如以下示例所示:
'CWWIM4544I Account newAcct(uid=newAcct,o=defaultWIMFileBasedRealm) is stored in the
file registry in the temporary workspace. You must use the "$AdminConfig save"
command to save it in the master repository.'
批处理方式示例用法
- 使用 Jython 字符串:
AdminTask.addFileRegistryAccount('[-userId newAcct -password new22password]')
交互方式示例用法
- 使用 Jython 字符串:
AdminTask.addFileRegistryAccount(['-userId', 'newAcct', '-password', 'new22password'])
changeFileRegistryAccountPassword 命令
changeFileRegistryAccountPassword 命令更改文件注册表帐户的密码。
目标对象
无。必需参数
- -userId
- 指定相关用户标识。(字符串,必需)
- -password
- 指定新密码。(字符串,必需)
可选参数
- -securityDomainName
- 指定唯一地标识安全域的名称。如果未指定此参数,那么此命令将使用全局联合存储库。(字符串,可选)
- -uniqueName
- 指定管理员的标准唯一名称。(字符串,可选)
返回值
此命令会返回一条指示该命令已成功运行的消息,如以下示例所示:
'CWWIM4545I The password is changed for newAcct(uid=newAcct,o=defaultWIMFileBasedRealm)
in the file registry in the temporary workspace. You must use the "$AdminConfig save"
command to save it in the master repository.'
批处理方式示例用法
- 使用 Jython 字符串:
AdminTask.changeFileRegistryAccountPassword('[-userId newAcct -password newPassword -uniqueName uid=newAcct,o=defaultWIMFileBasedRealm]')
交互方式示例用法
- 使用 Jython 字符串:
AdminTask.changeFileRegistryAccountPassword(['-userId', 'newAcct', '-password', 'newPassword', '-uniqueName', 'uid=newAcct,o=defaultWIMFileBasedRealm'])