Defect #14960
closedmigrate_from_mantis.rake does not import Mantis users, uses too short password
0%
Description
I installed Redmine using Bitnami Redmine Stack 2.3.3-0. Redmine is working fine. Below is the information fetch from the installed Redmine:
Information
Redmine 2.3.3.stable
Default administrator account changed True
Attachments directory writable True
Plugin assets directory writable True
RMagick available (optional) True
Environment:
Redmine version 2.3.3.stable
Ruby version 1.9.3-p231 (2012-05-25) [i386-mingw32]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
no plugin installed
Now, I've set the mysql root account access with no password. I can confirm that it is accessible via terminal by 'mysql -u root' and phpmyadmin with just username 'root'.
Mantis is install in the same database with different schema name 'bugtracker' (Redmine is redmine), and I can access Mantis (version 1.2.15) with the settings below taken from config_inc.php below:
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'bugtracker';
$g_db_username = 'root';
$g_db_password = '';
*When I do rake redmine:migrate_from_mantis RAILS_ENV=production
C:\BitNami\redmine-2.3.3-0\apps\redmine\htdocs>rake redmine:migrate_from_mantis
RAILS_ENV=production
WARNING: Your Redmine data will be deleted during this process.
Are you sure you want to continue ? [y/N] y
Please enter settings for your Mantis database
adapter [mysql2]:
host [localhost]:
database [bugtracker]:
username [root]:
password []:
encoding [UTF-8]:
Migrating usersrake aborted!
Validation failed: Password is too short (minimum is 8 characters)
Tasks: TOP => redmine:migrate_from_mantis
(See full trace by running task with --trace)
C:\BitNami\redmine-2.3.3-0\apps\redmine\htdocs>*
What is that about? No password is password too short? How am I going to connect to Mantis database? I even tried setting different users with all grants and long passwords, I'm highly in doubt there's a problem with the script. See attachments for more info. Thank you.
P/S: What is this 'admin' and password 'mantis' setting about?
# Users
print "Migrating users"
User.delete_all "login <> 'admin'"
users_map = {}
users_migrated = 0
MantisUser.all.each do |user|
u = User.new :firstname => encode(user.firstname),
:lastname => encode(user.lastname),
:mail => user.email,
:last_login_on => user.last_visit
u.login = user.username
u.password = 'mantis'
Files
Related issues
Updated by Mischa The Evil about 11 years ago
- File rm14960-increase_password_length_for_mantis_importer.diff rm14960-increase_password_length_for_mantis_importer.diff added
- Category changed from Files to Importers
- Priority changed from Urgent to Normal
Mac Chang wrote:
...
Migrating usersrake aborted! Validation failed: Password is too short (minimum is 8 characters)
...
What is that about? No password is password too short? How am I going to connect to Mantis database? I even tried setting different users with all grants and long passwords, I'm highly in doubt there's a problem with the script. See attachments for more info. Thank you.
...
P/S: What is this 'admin' and password 'mantis' setting about?
...
The importer scripts (both for Mantis and Trac) are importing the users from the other systems with a default fixed password (see RedmineMigrate). For the Mantis importer this password is currently mantis
(see source:/trunk/lib/tasks/migrate_from_mantis.rake#L250). Redmine raised the default minimum password length limit from 4 to 8 in r10884 resulting in the error you are experiencing now.
- change the Redmine application setting "Minimum password length" at Administration -> Settings -> Authentication (temporarily) to >= 6
or
- apply the patch (that I attach to this issue and which is based on the one provided in #14590 for the Trac importer script) which changes the password used by/in the importer script from
mantis
tomantismigratetoredmine
Updated by Mischa The Evil about 11 years ago
- Related to Defect #14590: migrate_from_trac.rake does not import Trac users, uses too short password added
Updated by Mac Chang about 11 years ago
- Status changed from New to Resolved
Fixed as advice. Thank you.
Updated by Mischa The Evil about 11 years ago
- Subject changed from migrate_from_mantis connection error to migrate_from_mantis.rake does not import Mantis users, uses too short password
- Assignee set to Jean-Philippe Lang
- Target version set to 2.3.4
- Resolution set to Fixed
Updated by Jean-Philippe Lang about 11 years ago
- Status changed from Resolved to Closed
- Resolution set to Fixed
Merged.