Advertisement:

Author Topic: [SMF Converter] vBulletin 4.0  (Read 154309 times)

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #20 on: December 28, 2010, 07:57:01 AM »
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.

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #21 on: December 28, 2010, 11:19:56 AM »
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?

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #22 on: December 28, 2010, 11:26:25 AM »
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'


Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #23 on: December 28, 2010, 12:06:33 PM »
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.

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: [SMF Converter] vBulletin 4.0
« Reply #24 on: December 28, 2010, 12:10:55 PM »
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."

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #25 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?

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: [SMF Converter] vBulletin 4.0
« Reply #26 on: December 28, 2010, 12:31:15 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."

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #27 on: December 28, 2010, 12:37:08 PM »
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

  • Guest
Re: [SMF Converter] vBulletin 4.0
« Reply #28 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.

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #29 on: December 29, 2010, 08:03:51 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

  • Guest
Re: [SMF Converter] vBulletin 4.0
« Reply #30 on: December 30, 2010, 03:48:34 AM »
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:

Code: [Select]
// 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:
Code: [Select]
/******************************************************************************/
--- Converting members...
/******************************************************************************/

TRUNCATE {$to_prefix}members;
Add after:
Code: [Select]
ALTER TABLE {$to_prefix}members
CHANGE COLUMN password_salt password_salt varchar(32) NOT NULL default '';
then restart the converter.

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #31 on: December 30, 2010, 04:28:20 PM »
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.

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: [SMF Converter] vBulletin 4.0
« Reply #32 on: December 30, 2010, 04:31:52 PM »
If I may post something I think is not really correct (but hey, here comes a PHP/SQL noob):

Code: [Select]
/******/
--- 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

  • Guest
Re: [SMF Converter] vBulletin 4.0
« Reply #33 on: December 31, 2010, 02:00:38 AM »
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

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: [SMF Converter] vBulletin 4.0
« Reply #34 on: December 31, 2010, 06:54:11 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."

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #35 on: December 31, 2010, 02:05:09 PM »
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

  • Guest
Re: [SMF Converter] vBulletin 4.0
« Reply #36 on: January 01, 2011, 05:30:57 AM »
I believe I've found the solution :) (my tests worked fine)..
in Sources/LogInOut.php find:
Code: [Select]
// vBulletin 3 style hashing?  Let's welcome them with open arms \o/.
$other_passwords[] = md5(md5($_POST['passwrd']) . $user_settings['password_salt']);

add after:
Code: [Select]
$other_passwords[] = md5(md5($_POST['passwrd']) . stripslashes($user_settings['password_salt']));
then use the attached version of vbulletin37_to_smf.sql.



Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #37 on: January 01, 2011, 02:43:31 PM »
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

  • Guest
Re: [SMF Converter] vBulletin 4.0
« Reply #38 on: January 01, 2011, 04:39:08 PM »
You're welcome :)

Offline Jed11

  • Semi-Newbie
  • *
  • Posts: 47
Re: [SMF Converter] vBulletin 4.0
« Reply #39 on: January 02, 2011, 06:18:21 PM »
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:

Quote
Recalculating 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.