WSO2 Identity Server 5.0.0 - chpasswd.sh无法正常工作

时间:2014-06-08 11:52:03

标签: wso2 wso2is

我在Ubuntu Linux 12.04 LTS上安装了WSO2 Identity Server 5.0.0。更换默认的wso2carbon密钥库后,我需要使用实用程序chpasswd.sh重置管理员密码。这是我遇到问题的地方,见下文。

root@test:~/wso2is-5.0.0/bin# ./chpasswd.sh --db-url "jdbc:h2:/root/wso2is-5.0.0/repository/database/WSO2CARBON_DB"
Buildfile: /root/wso2is-5.0.0/bin/build.xml

setup:
     [copy] Copying 41 files to /root/wso2is-5.0.0/repository/lib
    [mkdir] Created dir: /root/wso2is-5.0.0/tmp/setup
    [unzip] Expanding: /root/wso2is-5.0.0/repository/components/plugins/org.wso2.carbon.security.mgt.stub_4.2.0.jar into /root/wso2is-5.0.0/tmp/setup
    [unzip] Expanding: /root/wso2is-5.0.0/repository/components/plugins/org.wso2.carbon.security.mgt.ui_4.2.0.jar into /root/wso2is-5.0.0/tmp/setup
    [unzip] Expanding: /root/wso2is-5.0.0/repository/components/plugins/org.wso2.carbon.security.mgt_4.2.5.jar into /root/wso2is-5.0.0/tmp/setup
   [delete] Deleting directory /root/wso2is-5.0.0/tmp/setup
    [unzip] Expanding: /root/wso2is-5.0.0/repository/components/plugins/h2-database-engine_1.2.140.wso2v3.jar into /root/wso2is-5.0.0/repository/lib
    [unzip] Expanding: /root/wso2is-5.0.0/repository/components/plugins/org.wso2.carbon.utils_4.2.0.jar into /root/wso2is-5.0.0/repository/lib
     [copy] Copying 1 file to /root/wso2is-5.0.0/repository/lib
     [move] Moving 172 files to /root/wso2is-5.0.0/repository/lib
   [delete] Deleting directory /root/wso2is-5.0.0/repository/lib/META-INF
   [delete] Deleting directory /root/wso2is-5.0.0/repository/lib/org

BUILD SUCCESSFUL
Total time: 2 seconds
Username: admin
New password:

Re-enter new password:

[2014-06-07 22:56:16,110] ERROR {org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager} -  Using sql : UPDATE UM_USER SET UM_USER_PASSWORD= ?, UM_SALT_VALUE=?, UM_REQUIRE_CHANGE=?, UM_CHANGED_TIME=? WHERE UM_USER_NAME= ? AND UM_TENANT_ID=?
Error updating credentials for user admin : org.wso2.carbon.user.core.UserStoreException: Parameter "#6" is not set; SQL statement:
UPDATE UM_USER SET UM_USER_PASSWORD= ?, UM_SALT_VALUE=?, UM_REQUIRE_CHANGE=?, UM_CHANGED_TIME=? WHERE UM_USER_NAME= ? AND UM_TENANT_ID=? [90012-140]
root@test:~/wso2is-5.0.0/bin#

看起来脚本中存在错误。谁知道如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

这不是错误。当用户存储是基于JBDC的用户存储时,chpasswd.sh脚本文件用于更改用户的密码。这意味着,org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager文件中必须启用user-mgt.xml。所有基于Carbon的产品都附带启用JDBC用户存储,Identity Server除外。 WSO2 Identity Server使用LDAP服务器作为其默认用户存储。它在内部启动嵌入式ApacheDS LDAP服务器并连接到该LDAP服务器。因此,除非已将密码chpasswd.sh连接到JDBC用户存储,否则无法使用Identity Server脚本文件来更改密码admin。如果您想更改admin密码,则需要登录LDAP服务器并执行此操作。有几种方法,你可以做到。您可以使用任何可用的LDAP浏览器(ex-Directory studio)连接到嵌入式LDAP,并使用它更改{{1}}密码。