This is an old revision of the document!


When you forgot the admin password to log in to BioStar 2 Client

Instructions are diffrent based on your BioStar 2 version. Please check your BioStar 2 version before proceeding.

1. Go to the following link https://www.python.org/downloads/windows/

2. Click Python version 2.7:


3. Download the Windows x86-64 MSI Installer.


4. Install with admin privileges.

5. Open C:\Program Files\BioStar 2(x64)\util (your BioStar 2 installation folder) with Windows Explorer.

6. Open enckey with a text editor.


7. Copy the hash_key value.


8. Download the following file: BioStar2.6_admin_password_reset.zip

Notification: If you have upgraded under BioStar v2.6 and then upgraded to v2.6 or higher version, please use the below tool.
UpgradedBioStar2.6_gen_passwd_upgrade.zip

9. Paste the file to your Python folder (C: is default):


10. Download Visual C++ Compiler for Python 2.7: link

11. Install the downloaded installer.

12. Go to (this is based on Windows 7) Control Panel > System > Advanced system settings > Advanced > Environment Variables

13. Create a new user variable as below:

  • Variable name: PYTHON_HOME
  • Variable value: [Your Python installation path] (i.e C:\Python27\)



14. On system variables, edit the path value by adding the item below to the end of the variable value:

;%PYTHON_HOME%;%PYTHON_HOME%\Scripts\;

  • edit: if using windows 10, You will need to add values separately in a list. One value as %PYTHON_HOME% and another as %PYTHON_HOME%\Scripts\



15. Click OK and then OK to apply the settings.

16. Run command prompt with administrator privileges:

17. Type the following and press enter: pip install pycrypto



18. Go to your Python directory by entering cd [python path name]



19. Enter the following: python.exe gen_passwd.py [hashkey] [password]

  • hashkey: the hashkey is val you copied in step 7
  • password: your new password


For instance, if I wanted a new password of admin123 it would be as below:



20. If it ran successfully the result should show on the bottom row as below. Copy that value



21. Download HeidiSQL.


22. Install and run HeidiSQL.


22. Enter the information below on Settings:

  • Hostname/IP: 127.0.0.1
  • User: root
  • Password: [your root password]
  • Port: 3312



24. Click Open.

25. Access Maria DB and open the t_usr table.

26. Paste the password into the PW column of your desired user:

  • Double click the row and then paste the value




27. Log in to BioStar 2 and check that the user password was reset.

It is more complicated to reset your admin password in BioStar 2.5 because of new security features. Follow the steps below.

1. Go to the following link https://www.python.org/downloads/windows/

2. Click Python version 2.7:



3. Download the Windows x86-64 MSI Installer.



4. Install with admin privileges.

5. Access your BioStar 2 AC database.


6. For BioStar 2.5 : Run the following query:

Use biostar2_ac;
SELECT VAL from t_syscfg where SYSCFGUID = '3000';





7. For BioStar 2.5 : Right click and Copy the VAL row.



8. Download the attachment via the link: gen_passwd.py

9. Paste the file to your Python folder (C: is default):



10. Download Visual C++ Compiler for Python 2.7: link

11. Install the downloaded installer.

12. Go to (this is based on Windows 7) Control Panel > System > Advanced system settings > Advanced > Environment Variables

13. Create a new user variable as below:

  • Variable name: PYTHON_HOME
  • Variable value: [Your Python installation path] (i.e C:\Python27\)




14. On system variables, edit the path value by adding the item below to the end of the variable value:

;%PYTHON_HOME%;%PYTHON_HOME%\Scripts\;



15. Click OK and then OK to apply the settings.

16. Run command prompt with administrator privileges:

17. Type the following and press enter: pip install pycrypto



18. Go to your Python directory by entering cd [python path name]



19. Enter the following: python gen_passwd.py [hashkey] [password]

  • hashkey: the hashkey is val you copied in step 7
  • password: your new password


For instance if I wanted a new password of admin123 it would be as below:



20. If it ran successfully the result should show on the bottom row as below. Copy that value


21. Access Maria DB again and open the t_usr table.

22. Paste the password into the PW column of your desired user:

  • Double click the row and then paste the value




22. Log in to BioStar 2 and check that the user password was reset.


- This only applies to MariaDB which was implemented starting version 2.3.0
- Back up your database before proceeding.

The bat. script below resets the default administrator of BioStar 2.

You must know the password of your MariaDB root account to reset your BioStar admin password.

1. Download the following file: biostar2.3_resetpw.zip
2. Extract the file.
3. Run the file with administrative privileges.
4. Follow the instructions in the script.

This only applies to the SQLite AC database up to version 2.2.2

When you forgot the login password for the BioStar2 administrator account, you may initialize the administrator password back to the default password. This process will requires you to install DB Browser for SQLite. You can download this application from the following website at http://sqlitebrowser.org.
Please download and install the package that compatible with your current operating system.


1. Run DB Browser for SQLite.

2. Open existing BioStar2 database by selecting Open Database menu. The default location for BioStar2 db is C:\Program Files (x86)\BioStar 2\db\biostar2.db.


3. Please go to the Execute SQL tab to run the following SQL query statement.

  • This will reinitialize an administrator password to “admin” which was the default admin password.


1) Type the following query in the query editor.

UPDATE T_USR SET PW="D0TCsGaK2r257qdAydJ6yrmG4mrmST2G4bT5Fz0aIeE=" WHERE USRID=1;

2) Press button or F5 to execute the query statement.


4. Click Write Changes button to save the changes.


5. Open BioStar2 Client web site and please enter admin for both ID and password.