News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[SMF Converter] vBulletin 4.0

Started by Nibogo, October 13, 2010, 07:21:59 PM

Previous topic - Next topic

Jed11

TE:

I created a test user as you suggested with password "test" and it produced the following two columns in the user table:

password
57c29b97958b13008b4e4992335f3725

salt
iEsU|?JW.w8p-c}R9.7D=zZXWQ7iQj

I'll try you altered code shortly and be back with the results.  Thanks for your help.

Jed11

I tried just now and get:

Quote
Converting members... Unsuccessful!
This query:
ALTER TABLE ``.smf_membersCHANGE COLUMN password_salt password_salt varchar(32) NOT NULL default '';
Caused the error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLUMN password_salt password_salt varchar(32) NOT NULL default ''' at line 1


Any idea what the error could be?

Jed11

I found there error.

where ".smf_membersChange Column" change to ".smf_members Change Column"

Just needed a space between "members" and "Change"

Now I'm getting this error during the conversion of the attachments:

Quote
Converting attachments...
Unsuccessful!
This query:
SELECT
postid AS id_msg, counter AS downloads, filename, filedata, userid,
attachmentid
FROM ``.attachment
LIMIT 0, 500;
Caused the error:

Unknown column 'postid' in 'field list'


Jed11

Changed "postid" to "contentid" and got past that one to the next one... "filedata"  a little research on that one tells me it should only be used if the content of the attachment is stored in the database (mine is not) so I deleted "filedata" and got through to the end of the converter.

I loaded up the forum with everything converted, tried to log in and my password was not accepted. 

The passwords did not migrate.

NanoSector

I don't get why people pay for vBulletin, to convert to free software later...

Anyhow;
@Jed11: I lost admin account, what can I do?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Jed11

Sheesh Simple Series team!  With 1,410 posts maybe you should read more and post less!  As I stated a half a dozen posts up:

Quote
I read frequently of people asking legitimate questions about how to do something and being told "why would you want to do that" or "it's easy for a member to just do so and so..." 

Count yourself in that category of people making comments irrelevant to the solution of the problem being discussed.  Your link to the "Lost Admin Account" instructions is useless to this discussion.

Do you have any idea how to migrate user passwords?

NanoSector

Quote from: Jed11 on December 28, 2010, 12:25:22 PM
Sheesh Simple Series team!  With 1,410 posts maybe you should read more and post less!  As I stated a half a dozen posts up:

Quote
I read frequently of people asking legitimate questions about how to do something and being told "why would you want to do that" or "it's easy for a member to just do so and so..." 

Count yourself in that category of people making comments irrelevant to the solution of the problem being discussed.  Your link to the "Lost Admin Account" instructions is useless to this discussion.

Do you have any idea how to migrate user passwords?
May I have a personal opinion? Thank you. I never directed my post at anyone.

My link indeed is useful; if you can't access your admin acount anymore, you can follow these steps to recover it, or maybe create a new one.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Jed11

Useless post.

If anyone can help with the migration of passwords I would be most appreciative. I have a fully migrated board, but all the passwords still have to be reset by the users.  I'm looking for a solution.

ThorstenE

Jed11,
I'll check the password encoding later.. can you re-convert the entire board or do you already use SMF as your forum? As far as I can see the salt was cut off by the converter, therefore salt and paswords don't match (and are useless even with a proper login fix). At least the members table needs to be converted again.

Jed11

Quote from: TE on December 29, 2010, 03:04:59 AM
Jed11,
I'll check the password encoding later.. can you re-convert the entire board or do you already use SMF as your forum? As far as I can see the salt was cut off by the converter, therefore salt and paswords don't match (and are useless even with a proper login fix). At least the members table needs to be converted again.

Thanks TE.  I've got everything up on a test site ready to try or retry anything that might work.

ThorstenE

Jed11,
I've done some tests and passwords are working as expected :)
your posted password and salt is already supported by SMF 2 RC4 by default:


// vBulletin 3 style hashing?  Let's welcome them with open arms \o/.
$other_passwords[] = md5(md5($_POST['passwrd']) . $user_settings['password_salt']);

however the converter needs to be slightly changed to convert the salts:
in vbulletin4_to_smf.sql find:
/******************************************************************************/
--- Converting members...
/******************************************************************************/

TRUNCATE {$to_prefix}members;

Add after:
ALTER TABLE {$to_prefix}members
CHANGE COLUMN password_salt password_salt varchar(32) NOT NULL default '';

then restart the converter.

Jed11

TE:

I appreciate your help on this, but my passwords are still not migrating.  Straight conversion with the change you've provided results in a converted forum except user's passwords.  It's as if your change had no effect here.

NanoSector

If I may post something I think is not really correct (but hey, here comes a PHP/SQL noob):

/******/
--- Converting members...
/*******/
In this code, it looks like you make a multiline comment, close it immediately, make a --- statement, and do the same as before...

Is the --- statement used for displaying stuff, or is it another comment?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

ThorstenE

Quote from: Jed11 on December 30, 2010, 04:28:20 PM
I appreciate your help on this, but my passwords are still not migrating.  Straight conversion with the change you've provided results in a converted forum except user's passwords.  It's as if your change had no effect here.
That's weird.. the "test" password worked fine for me. Would you please attach your vBullein4_to_smf.sql?
Found this article: http://www.vbulletinguru.com/?s=vbulletin+4+password+encryption
Maybe their passwords encryption has changed again, which version of vBulletin exactly do you use?

@Simple Series team:
the syntax is a special SMF converter code and handeled by convert.php

NanoSector

Quote from: TE on December 31, 2010, 02:00:38 AM
@Simple Series team:
the syntax is a special SMF converter code and handeled by convert.php
Ah, right. Just ignore my noobiness ;)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Jed11

Quote
That's weird.. the "test" password worked fine for me. Would you please attach your vBullein4_to_smf.sql?
Found this article: http://www.vbulletinguru.com/?s=vbulletin+4+password+encryption
Maybe their passwords encryption has changed again, which version of vBulletin exactly do you use?

That would be my guess.  I hadn't seen the article (thanks for the link).  vB4 has been so buggy they've been popping out updates and patches so frequently it's hard to keep up.  I'm running 4.1.0 so I'd bet they've altered the structure of the encryption. 

I've attached the vBulletin4_to_smf.sql I used for this last conversion attempt. 

I'm really close to deciding to bite the bullet and advise my members to reset their passwords.

ThorstenE

I believe I've found the solution :) (my tests worked fine)..
in Sources/LogInOut.php find:

// vBulletin 3 style hashing?  Let's welcome them with open arms \o/.
$other_passwords[] = md5(md5($_POST['passwrd']) . $user_settings['password_salt']);


add after:
$other_passwords[] = md5(md5($_POST['passwrd']) . stripslashes($user_settings['password_salt']));

then use the attached version of vbulletin37_to_smf.sql.



Jed11

TE:

Success!!!! You did it!  VB4.1.0 to SMF 2.0 RC4 complete with attachments and passwords.  This is a full converter for me.  Most excellent work!

ThorstenE


Jed11

Well, another followup post is due here... as posted above I had success performing a complete conversion on my test site so today I went in head first for the real thing.  My actual application was a little more complicated... I first merged a database from a smf 2.0 RC2 to my VB 4.1.0 using the Impex system with Vbulletin.  Everything migrated as it should - so my next step was to convert the two merged boards as a VB 4.1.0 to a smf 2.0 RC4. 

I got the following error:

QuoteRecalculating forum statistics... Duplicate key name 'ip_index'

A google search brought me to another one of your posts TE... addressing it here:

http://www.simplemachines.org/community/index.php?topic=242961.msg2867944#msg2867944

I replaced the code as instructed and the coversion was flawless.  All issues with attachments passing from VB4 to SMF and all password problems were resolved.

I've attached the convert.php and the vbulletin4_to_smf.sql with all the changes in case it may benefit someone else.  The only thing you need to remember in addition to the attached two files is to be sure and alter your /Sources/LogInOut.php file as TE explains in this thread.

Thanks again for all the help on this.




Advertisement: