環境:html
Ubuntu 13.10
bitnami-redmine-2.5.1-1-linux-x64-installer.run
mysql
用bitnami安裝完redmine之後,有是否忘記了username和password。但是又沒有配置郵件server,沒法找回password。linux
僅僅能去server更改了。更改過程例如如下:sql
1. 改動 安裝文件夾/redmin/apps/redmine/htdocs/config/database.yml,更對相應的username,password,數據庫地址,port號數據庫
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.sock development: 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: utf82. 進入例如如下文件夾
cd 安裝文件夾/redmin/apps/redmine/htdocs/script
ruby
3. 運行例如如下命令,進入rubyapp
./rails console productionsocket
4. 取得你要改動的用戶對象(ruby>表明進入ruby環境)ui
ruby> admin_user = User.find_by_login('你要改的username')this
5.改動admin用戶對象password
ruby> admin_user.password = '你的密碼'
注: 這個password不能過短,不然報錯。
6.保存admin用戶對象信息
ruby> admin_user.save!
7.退出ruby環境
ruby> quit
這樣應該就可以用yourpassword這個新密碼登陸系統了