プロジェクト

全般

プロフィール

Vote #74428

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Importers_15
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
15
version_id:
74
issue_org_id:
14960
author_id:
86180
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
73
ステータス-->[Closed]

説明

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'


journals

Mac Chang wrote:
> ...
> <pre>Migrating usersrake aborted!
Validation failed: Password is too short (minimum is 8 characters)</pre>
> ...
> 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@
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Fixed as advice. Thank you.
--------------------------------------------------------------------------------
Mac Chang wrote:
> Fixed as advice. Thank you.

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

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

--------------------------------------------------------------------------------
@Mischa: Thanks
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------


related_issues

relates,Closed,14590,migrate_from_trac.rake does not import Trac users, uses too short password

Admin Redmine さんが3年以上前に更新

  • カテゴリImporters_15 にセット
  • 対象バージョン2.3.4_74 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0