简体   繁体   中英

WSO2 Identity Server 5.0.0 - chpasswd.sh not working

I have installed WSO2 Identity Server 5.0.0 on Ubuntu Linux 12.04 LTS. After replacing the default wso2carbon keystore I need to reset the admin password using the utility chpasswd.sh. This is where I run into problems, see below.

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#

It looks like there is a bug in the script. Anyone who knows how to solve this?

This is not a bug. chpasswd.sh script file is used to change the password of users, when user store is a JBDC based user store. It means, org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager must be enabled in your user-mgt.xml file. All Carbon based products are shipped with enabling JDBC user store except Identity Server . WSO2 Identity Server uses a LDAP server as its default user store. It starts an embedded ApacheDS LDAP server internally and connects to that LDAP server. Therefore you can not use chpasswd.sh script file to change the password Identity Server unless it has been connected to JDBC user store. If you wish to change the admin password, You need to login to LDAP server and do it. There are several ways, you can do it. You can connect to embedded LDAP using any available LDAP browser (ex- Directory studio) and change the admin password using it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM