Redmine forgot user name and password

Source: Internet
Author: User
Tags redmine

Environment:


Ubuntu 13.10
Bitnami-redmine-2.5.1-1-linux-x64-installer.run


After installing redmine with bitnami, do you forget your username and password. However, the email server is not configured and the password cannot be retrieved.

It can only be changed on the server. The procedure is as follows:


1. Modify the installation directory/redmin/apps/redmine/htdocs/config/database. yml to change the user name, password, database address, and port number.

production:  adapter: mysql2  database: bitnami_redmine  host: 127.0.0.1  username: root  password: ""  port: 3307  encoding: utf8  socket: /home/hyadmin/redmin/mysql/tmp/mysql.sockdevelopment:  adapter: mysql2  database: redmine_development  host: localhost  username: root  password: ""  encoding: utf8# Warning: The database defined as "test" will be erased and# re-generated from your development database when you run "rake".# Do not set this db to the same as development or production.test:  adapter: mysql2  database: redmine_test  host: localhost  username: root  password: ""  encoding: utf8
2. Go to the following directory

Cd installation directory/redmin/apps/redmine/htdocs/script


3. Run the following command to go to ruby

./Rails console production


4. Get the user object you want to modify (ruby> indicates entering the ruby environment)

Ruby> admin_user = User. find_by_login ('user name you want to change ')

 

5. Modify the admin user object Password

Ruby> admin_user.password = 'your password'

Note: The password cannot be too short; otherwise, an error is returned.

 

6. Save admin user object information

Ruby> admin_user.save!

 

7. Exit the ruby Environment

Ruby> quit

 

In this way, you can use the new password yourpassword to log on to the system.







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.