Content
You are here:
Recover lost login data
Added by Hiran Chaudhuri about 4 years ago
Hello there,
it may sound awkward but I have an OpenProject installation that was not maintained for some time and the last successful login is about 9 months ago.
For some reason now the system denies all logins - even the admin user cannot logon any more. However I have access to the underlying mysql database.
Is there any way for me to regain access via the GUI?
Can I tweak the user_passwords table to either make the password work or make it look like the user has not set any password?
(I'd like to mention the OpenProject version however that is not shown on the login form)
Hiran
Replies (1)
Hi Hiran,
ideally you would update your user through OpenProject, as the passwords table will require you updating the bcrypt hash (would also work if you know how to generate it).
If you're on a packaged installation, run a console with
openproject run console
Update the user with
user = User.find_by(login: 'your login name'); user.password = user.password_confirmation = 'Your new password'; user.save! user.activate!
This should activate and save the user with the given password. You can repeat this for multiple logins.
Best
Oliver