Project

General

Profile

Actions

Defect #14960

closed

migrate_from_mantis.rake does not import Mantis users, uses too short password

Added by Mac Chang over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Category:
Importers
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

screeshot.png (44.8 KB) screeshot.png Screen shot Mac Chang, 2013-09-21 08:12
migrate_from_mantis.rake (18.6 KB) migrate_from_mantis.rake migrate_from_mantis.rake Mac Chang, 2013-09-21 08:14
rm14960-increase_password_length_for_mantis_importer.diff (596 Bytes) rm14960-increase_password_length_for_mantis_importer.diff Mischa The Evil, 2013-09-21 23:36

Related issues

Related to Redmine - Defect #14590: migrate_from_trac.rake does not import Trac users, uses too short passwordClosedJean-Philippe Lang

Actions
Actions #1

Updated by Mischa The Evil over 11 years ago

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.

There are two ways to "fix" this:
  • 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 to mantismigratetoredmine
Actions #2

Updated by Mischa The Evil over 11 years ago

  • Related to Defect #14590: migrate_from_trac.rake does not import Trac users, uses too short password added
Actions #3

Updated by Mac Chang about 11 years ago

  • Status changed from New to Resolved

Fixed as advice. Thank you.

Actions #4

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

Mac Chang wrote:

Fixed as advice. Thank you.

This issue is now fixed in the core code by JPL in r12163.

jp jp: I've set this issue's properties, according to #14590 and convention, to create a separate changelog entry for the fixed Mantis task also.

Actions #5

Updated by Mischa The Evil about 11 years ago

  • Resolution deleted (Fixed)
Actions #7

Updated by Jean-Philippe Lang about 11 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

Merged.

Actions

Also available in: Atom PDF