Create a Redmine admin user from CLI

Start a production Rails console:

cd /opt/my/path/to/redmine
bundle exec rails c production

In the console: 'newadmin', admin: true, 
mail: '[email protected]', 
firstname:'Redmine' , lastname:'Admin')

#password cannot be mass assigned so it needs to be specified separately

=> true #true means the creation was successful

In case save failed:

u.errors.messages #Displays saving errors


Leave a Reply