OpenClinica User Manual/ResetRootPassword

Resetting root's password
When you do not have the password of root anymore and you still want to access OpenClinca you can reset it to 12345678.

You do this by connecting to the study database (e.g. the database openclinica rather than postgres), either by using the psql-commandline-utility or by pgAdmin. You can issue the next command either as user postgres or as user clinica.

For OpenClinica 3.1 and later: UPDATE user_account SET passwd='7c222fb2927d828af22f592134e8932480637c0d', status_id=1, lock_counter=0 WHERE user_name='root';

For OpenClinica 3.0 and possibly earlier: UPDATE user_account SET passwd='7c222fb2927d828af22f592134e8932480637c0d', account_non_locked=TRUE, lock_counter=0 WHERE user_name='root';

This command not only resets the password (to 12345678, passwd is set to the SHA1 hashed value of 12345678: '7c222fb2927d828af22f592134e8932480637c0d'), but also resets the counter of failed logins to 0 and unlocks the account).