• Help! How to re-active okmAdmin account?

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #48742  by lotwan
 
I made a catastrophic mistake, de-active all users include okmAdmin. So can not login anymore, :(
It is embeded database HSQL, How to re-active okmAdmin or add a new ROLE_ADMIN user.
Any one could help me. Thanks very much!!
Version openKM 6.3.1.
 #48756  by jllort
 
I encourage you to export all the repository into a standard database like MySQL it is a very bad idea having into an embedded one like HSQL ( If the hardware shutdown incorrectly, might damage the database and then you will discover is not possible to recover anything ).

Well, let's go with the steps to recovering. First understanding HSQL only allow a single connection, that means when you have OpenKM started and connected to HSQL you are not allowed to set another connection. Than means, OpenKM must be stopped.
1- stop OpenKM
2- in the conf/server.xml you have the JDBC URL connection data
3- use a database client to connect with database
Like datastudio ( http://www.aquafold.com/aquadatastudio.html ) or into your tomcatXXX/lib folder you have the file name hsqldb.jar go ( open a terminal, and from the command line execute "java -jar hsqldb.jar" -> will be shown the client.

When you succeed on it, you might be interested in updating the OKM_USERS table.

Finally, that is a good time for planning migration to MySQL.
 #48841  by lotwan
 
Dear Jllort,
need you help.
after java -jar hsqldb.jar, open the client, but don't how to do next.
Could you teach me step by step? Thanks a lot.
2
2
1.png (14.49 KiB) Viewed 2986 times
1
1
2.png (28.84 KiB) Viewed 2986 times
 #48844  by jllort
 
HSQL Engine sure is not in memory must be a file system location. Change the option to set the file system location.

I suggest a backup before continuing to lose data prevention.
 #48858  by lotwan
 
Dear Jllort,
I use another clicent SQL Workbench open the table OKM_USER.
Then modify the USR_ACTIVE from F to T. And also add a new user wan.
1.png
1.png (29.35 KiB) Viewed 2955 times
2.png
2.png (16.4 KiB) Viewed 2955 times
But can not work.
3.png
3.png (15.68 KiB) Viewed 2955 times
I test these step at another PC with a new openKM server, it can work normaly, can login in.
Could giev some tip? What should I do next?
Thanks again.
 #48867  by jllort
 
If you updated the column active to "T" in the OKM_USERS TABLE should not be any reason why you are not able to login, if this is the only think you have changed.

Default okmAdmin password in database is "21232f297a57a5a743894a0e4a801fc3" what seems is your case, ensure you do not have extra spaces etc...

Your OpenKM.xml should have:
Code: Select all
<!-- Security configuration -->
  <security:authentication-manager alias="authenticationManager">
    <security:authentication-provider>
      <security:password-encoder hash="md5"/>
      <security:jdbc-user-service 
        data-source-ref="dataSource"
        users-by-username-query="select usr_id, usr_password, 1 from OKM_USER where usr_id=? and usr_active='T'"
        authorities-by-username-query="select ur_user, ur_role from OKM_USER_ROLE where ur_user=?"/>
    </security:authentication-provider>
  </security:authentication-manager>

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.