MyBB Community Forums

Full Version: Mass Import of users into database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I am new to this software and am running it as a test installation on my own server. The BB works perfectly and has integrated well into the MySQL database (though there were some connection issues similar to what other people have mentioned too).

The reason I am writing is to ask if it is possible to run a mass import of about 200 users who are already registered for a website and email access etc?

I have found the users table (named mybb_user) in MySQL but the passwords themselves are salted and hashed. I appreciate this is a necessary security consideration but does anyone know which hash is used? I tried the MySQL password, MD5 and SHA1 however the (? random) salt makes it difficult if not impossible for me to reproduce the password.

BTW - I have a plain text listing of the users passwords on the main site (big security issue, I appreciate) so it would be just a case of writing an import command with the correct info.

Has anyone got any experience of this? I really don't want to hand type 220 odd registrations.

Thanks for any advice. This software looks excellent.



Martyn
This is the encryption method.

$encrypted_pass = md5(md5($salt).md5($plaintext_pass));

$salt is a random 8 character string created in ./inc/datahandlers/user.php
Alternatively you can ignore the salt altogether and just use md5(plaintextpassword) [which was used in old mybb], then MyBB will salt it for you the first time the user logs in...

Of course if your existing system already uses hashes, unless they happen to be unsalted md5, you'll just have to write a plugin that does the authentification for you, using the hashing method of your existing system (and converting to MyBB).

I think there are some examples that do this with existing forum conversion scripts (mybb merge system).
(2010-03-15, 06:05 PM)frostschutz Wrote: [ -> ]Alternatively you can ignore the salt altogether and just use md5(plaintextpassword) [which was used in old mybb], then MyBB will salt it for you the first time the user logs in...

Of course if your existing system already uses hashes, unless they happen to be unsalted md5, you'll just have to write a plugin that does the authentification for you, using the hashing method of your existing system (and converting to MyBB).

I think there are some examples that do this with existing forum conversion scripts (mybb merge system).

Thanks for your replies gentlemen.

I think between both responses I have got the info I need.
Yes, I will need to write some script to import the files from the plain text password.

The server is becoming a little out of hand anyway... it uses Ubuntu 6.06 and the Parallels panel to support it. Currently there are 3 different login sections which I really would like to be unified. When I manually register users I have to add their details into the 'Password Protected Directories', Webmail, moodle and finally the mailman system.

Thanks for all your advice people.


Martyn.