How to change redmine admin password?

Today, when I try to run my plugin tests, I’ve needed the answer for this question and I did some research. Here is the answer:

# start console
rails c

# if you want to start with another env, you can use this command:
RAILS_ENV=test rails c
# find your user by login name
user = User.where(login: 'admin').first
# set new password like this example
user.password = '123456789'
user.password_confirmation = '123456789'
# and save the user in last step with this command
user.save!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s