Can I convert an md5 password to a Joomla password ($salt)

Discussion regarding Joomla! security issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
tsili
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Jul 09, 2008 4:57 pm

Can I convert an md5 password to a Joomla password ($salt)

Post by tsili » Wed Feb 04, 2009 11:35 am

Hi,

I have built a service for registering users coming from an outside source to my Joomla database.
However, the password I get is not 'raw'-it is already in md5 format.
Can I perform any action on this md5 password so I can store it in the db the way Joomla wants?

I believe the way Joomla 1.0.15 stores passwords is the following:

$salt = a 32 random number;
$crypt = md5($raw_password . $salt);
$pass_stored_in_the_db = $crypt.':'.$salt;

However, I don't have the password in its raw format; only in its md5 one.

Any ideas?

Thanks!

jWarlock
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Thu Jan 01, 2009 2:28 am
Location: Brisbane, Australia
Contact:

Re: Can I convert an md5 password to a Joomla password ($salt)

Post by jWarlock » Wed Feb 04, 2009 12:12 pm

You can store a password in the database as an MD5 (unsalted) as of Joomla 1.0.15 (i believe) it will salt the MD5 on the first login after the password update / creation.

If you look it up, you can reset your Joomla 1.0 password using the following query:

UPDATE jos_users SET password=MD5('password text') WHERE ID='62'

The same can be done on an INSERT statement when creating a user:

INSERT INTO jos_users (......,password) VALUES (...,MD5('password_text'));

tsili
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Jul 09, 2008 4:57 pm

Re: Can I convert an md5 password to a Joomla password ($salt)

Post by tsili » Wed Feb 04, 2009 1:57 pm

Thanks but this doesn't work! You can not login if you store the md5 password only. You need to get it 'salted' before...

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30923
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Can I convert an md5 password to a Joomla password ($salt)

Post by Per Yngve Berg » Wed Feb 04, 2009 3:04 pm

Just add ":" to the end of the password and it will work.

UPDATE jos_users SET password=concat(password,':');

gonso75
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Jul 09, 2009 11:21 am

Re: Can I convert an md5 password to a Joomla password ($salt)

Post by gonso75 » Thu Jul 09, 2009 11:25 am

Hi,

Im using a joomla 1.5.10 and Im trying to insert users from a php page, since I need to populate a custom table.

Im having the problem describe here, where I don't know how to populate the password field.
I've tried clear text: paco
I've tried MD5('paco'): 311020666a5776c57d265ace682dc46d
I've tried adding colon: 311020666a5776c57d265ace682dc46d:

None of these worked. I always get wrong user password.

What can I do?

Thanks!
Gonso

chadrick
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon May 17, 2010 4:48 pm

Re: Can I convert an md5 password to a Joomla password ($sal

Post by chadrick » Mon May 17, 2010 4:50 pm

I am having the same problem. Does anyone have a way of doing this yet? Thanks

modhumiah
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Wed Feb 24, 2010 2:14 am

Re: Can I convert an md5 password to a Joomla password ($sal

Post by modhumiah » Mon May 17, 2010 7:44 pm

gonso75 wrote:Hi,

Im using a joomla 1.5.10 and Im trying to insert users from a php page, since I need to populate a custom table.

Im having the problem describe here, where I don't know how to populate the password field.
I've tried clear text: paco
I've tried MD5('paco'): 311020666a5776c57d265ace682dc46d
I've tried adding colon: 311020666a5776c57d265ace682dc46d:

None of these worked. I always get wrong user password.

What can I do?

Thanks!
Gonso
I did the same and its definitely not working.


Locked

Return to “Security - 1.0.x”