Caution: Instructions are different based on your BioStar 2 version. Please check your BioStar 2 version before proceeding.


For BioStar Version 2.6 and Above 

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


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]  


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

hashkey: the hashkey is val you copied in step 7

password: your new passw


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


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


20. Access Maria DB and open the t_usr table. 


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

* Instructions on accessing your DB is shown in the following article: [BioStar 2] MariaDB Access and Account Configuration

* Double click the row and then paste the value 


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



For BioStar Version 2.5 

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. 

* Instructions on accessing your DB is shown in the following article: [BioStar 2] MariaDB Access and Account Configuration


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 at the bottom of this page: 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]  


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

hashkey: the hashkey is val you copied in step 7

password: your new passw


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


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


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


21. 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. 



For BioStar Versions 2.3.0 to 2.4.1


Warning: Back up your database before proceeding.


Scripted Option 


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. 


Manual Option


Run the query below in the BioStar 2 AC database. 


USE biostar2_ac;

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



Note: For MSSQL the query is as follows 

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



You can learn how to access the database in the link provided below: 

[BioStar 2] MariaDB Access and Account Configuration


Your login credentials for the admin account will be 

ID: admin

PW: admin

For BioStar Versions 2.0~2.2.2

Warning: Back up your database before proceeding.


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


If you forget the login password for the BioStar2 administrator account, you may initialize the administrator password back to the default password with the instructions shown below. 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;


Note: For MSSQL the query is as follows 

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.