Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a rake command to reset a Redmine admin password?

I have lost the admin password for a redmine installation, and after trying the method of clearing the salt and setting the default hash for the password password I still cannot login.

Is there a rake command to set the default password, or set a specific password?

The Redmine version is 2.4.2

like image 516
vfclists Avatar asked Dec 08 '22 03:12

vfclists


1 Answers

I believe you can reset your (any) password from rails console. Go to the Redmine folder on server and

# start console
RAILS_ENV=production bundle exec rails c

# find your user
user = User.where(email: '[email protected]').first

# set new password
user.password = '123123'
user.password_confirmation = '123123'

# save changes
user.save!

Please note if save! returns exception then changes can not be applied. Post exception message to the question.

like image 58
gotva Avatar answered Dec 28 '22 08:12

gotva