WSO2Con 2013 CFP Banner

Need the reset the admin password (someone lost a note)

jhondius's picture
Hi all, I need to reset the admin password that is in use in a WSAS-3.1.3 installation. The chpasswd.bat tells me: Exception in thread "main" java.lang.NoClassDefFoundError: org/wso2/wsas/util/Pa sswordUpdater I found several similar issues in Jiira, but all of them in other versions. I also found that the org.wso2.wsas.util.PasswordUpdater.class seems not to be not present in any of the wso2 jars in the lib/ dirs. I would not like to have to update this particular WSAS install. Is there a .jar containing the PasswordUpdater.class and its imports? Maybe more importantly: Is there an other way to reset the admin password?
deep's picture

WSO2 Appserver ( WSAS ) change password

First you have to shut down the running WSO2 WSAS (Appserver) and give following commands. These instruction for Linux but you can follow same commands on windows also. deep@den:/vm/works/wso2wsas-3.1.3/bin$ ./chpasswd.sh --username admin --db-url jdbc:h2:/vm/works/wso2wsas-3.1.3/database/WSO2CARBON_DB Buildfile: /vm/works/wso2wsas-3.1.3/bin/build.xml setup: [mkdir] Created dir: /vm/works/wso2wsas-3.1.3/tmp/setup [delete] Deleting directory /vm/works/wso2wsas-3.1.3/tmp/setup [unzip] Expanding: /vm/works/wso2wsas-3.1.3/webapps/ROOT/WEB-INF/plugins/common/h2-database-engine-1.1.112.wso2v1.jar into /vm/works/wso2wsas-3.1.3/repository/lib [unzip] Expanding: /vm/works/wso2wsas-3.1.3/webapps/ROOT/WEB-INF/plugins/common/org.wso2.carbon.utils-2.0.3.jar into /vm/works/wso2wsas-3.1.3/repository/lib [delete] Deleting directory /vm/works/wso2wsas-3.1.3/repository/lib/META-INF [delete] Deleting directory /vm/works/wso2wsas-3.1.3/repository/lib/org BUILD SUCCESSFUL Total time: 0 seconds New password: Re-enter new password: Using default settings to change the password, Hashing Algorithm : MD5 and Salted Password : False log4j:WARN No appenders could be found for logger (net.sf.ehcache.CacheManager). log4j:WARN Please initialize the log4j system properly. deep@den:/vm/works/wso2wsas-3.1.3/bin$
jhondius's picture

Thanks deep, i see that i

Thanks deep, i see that i overlooked the fact that i need ant for that. i'll try and report back here.
jhondius's picture

ant works but no luck yet

Buildfile: C:\RemFramework\WSAS\3.1.3\bin\build.xml setup: [mkdir] Created dir: C:\RemFramework\WSAS\3.1.3\tmp\setup [delete] Deleting directory C:\RemFramework\WSAS\3.1.3\tmp\setup [unzip] Expanding: C:\RemFramework\WSAS\3.1.3\webapps\ROOT\WEB-INF\plugins\c ommon\h2-database-engine-1.1.112.wso2v1.jar into C:\RemFramework\WSAS\3.1.3\repo sitory\lib [unzip] Expanding: C:\RemFramework\WSAS\3.1.3\webapps\ROOT\WEB-INF\plugins\c ommon\org.wso2.carbon.utils-2.0.3.jar into C:\RemFramework\WSAS\3.1.3\repository \lib [delete] Deleting directory C:\RemFramework\WSAS\3.1.3\repository\lib\META-IN F [delete] Deleting directory C:\RemFramework\WSAS\3.1.3\repository\lib\org BUILD SUCCESSFUL Total time: 0 seconds Exception in thread "main" java.lang.NoClassDefFoundError: org/wso2/wsas/util/Pa sswordUpdater
jhondius's picture

fixed, thanks

it works great, thanks. my bad. in a previous dwelling i changed org/wso2/carbon/core/util/PasswordUpdater org/wso2/wsas/util/PasswordUpdater with ant and the right classname it works nicely. Greets J.