Tuesday 1 May 2012

How to reset admin pass in CMS Made Simple

How to Reset Admin Password for CMSMS?


Since Last few hour I was trying to recover admin password for one of my client admin panel user password and searched a lot on net but found no luck, Since I was having Db access So good idea from one post to change md5 encrypted password from table cms_users and I used md5 creator at http://md5encryption.com/


But that didn't solved my issue as it was found in many forums. So I got into little depth to solve it.

Find solution here:



after changing password with new md5 Created password from http://md5encryption.com/ in cms_users you have to do little changes in classes found at lib\classes\


class.user.inc.php



Change:


function SetPassword($password)
    {
        $this->password = md5(get_site_preference('sitemask','').$password);
    }



To:


function SetPassword($password)
    {
        $this->password = md5($password);

    }

class.useroperations.inc.php


Change:

if ($password != '')
        {
          $where[] = 'password = ?';
          $params[] = md5(get_site_preference('sitemask','').$password);
        }


To:

if ($password != '')
        {
          $where[] = 'password = ?';
          $params[] = md5($password);
        }


Actually CMSMS includes some more values to password before encrypting to which we have changed to normal md5 of password only.


Now you have login to admin site you have cracked password for CMSMS admin.







No comments:

Post a Comment