3

I replaced the admin password with one that was md5 and now I can't reset the password. it seems to be mcrypted. Does anyone have an idea how to gain access again to sugar? E-Mail is not working.

pauel
  • 908
  • 10
  • 26

2 Answers2

6

Run the following against the Sugar database to reset the admin password to "test" then login and reset your password.

update users set user_hash = '098f6bcd4621d373cade4e832627b4f6' where user_name = 'admin';
egg
  • 1,736
  • 10
  • 12
  • nice guess :-) but it's encryption changed from md5 to a real one. I think it uses a salt. I'm diving into the code now to see how it is done and where the salt comes from – pauel Nov 09 '12 at 11:09
  • 1
    You should still be able to put in an MD5 password in there and it work fine. – jmertic Nov 12 '12 at 15:16
  • Thank you very much, this is correct. So my login problem has another cause. – pauel Nov 13 '12 at 08:02
4

If the database is MySQL, you can easily set the password to whatever you like by using the built in md5 function:

update users set user_hash = md5('mynewpassword') where id = '1';

Matthew Poer
  • 1,682
  • 10
  • 17