Project

General

Profile

Programmatically Setting the Default Admin Account's Password?

Added by Jon Jaroker over 12 years ago

Hello, I would like to set the default admin's password as part of an automated Redmine 2.0 install. The password must be set programmatically, not through the web interface. I am new to Redmine and am not sure what would be the simplest approach to achieve this.

How would you set the admin's password programmatically? I see a few options, but am not sure if there are simpler or better ones:

  • modify db/migrate/001_setup.rb? This approach may be difficult to maintain if future releases change this file
  • is it possible to add a custom setup script in db/migrate to update the database record?
  • modify the database table directly after db:migrate?
  • could configuration.yml be used to set the password? I can't find any information about this in the codebase

Suggestions?

-- Jon