0

The website was written in php and there isn't any option to reset password for administrator. How can I change admin user's password using phpmyadmin where user's password field is in varchar(250) format?

I've found some tutorials where if I change password field to something like this: d9b1d7db4cd6e70935368a1efb10e377

then i can log in to website with 123 password. But the above symbols are for varchar and my password fields require varchar250. Is there any option to convert text to varchar250 so I can just change pass field and log in to website?

How Can i change my password having access to database? What are some other ways of solving this. Thanks

4
  • 3
    250 is just the number of characters your varchar field can accept its not a different format. So go ahead and do it.
    – Indrajit
    Mar 7, 2016 at 11:59
  • I tried but still can't log in
    – Power
    Mar 7, 2016 at 12:07
  • Are you sure that changing the password to what you have in the code will allow you to log in with '123' as password? If you have a varchar(250) as password field, it is unlikely that md5 is used for securing the passwords. Have you checked your code as to how the passwords are secured within your application (if secured at all)?
    – Shadow
    Mar 7, 2016 at 12:08
  • Probably I guess you are not storing the password in md5 format otherwise it would have surely worked.
    – Indrajit
    Mar 7, 2016 at 12:13

1 Answer 1

0

passwords Should be encrypted ... please see a code on php what encryption is being used

for example if it is using md5 generate password online and copy and paste that hash into your database password field ..

Most probably it may use md5 sha1 encryption .. if you dont have any access to the code try those hash

Here is link for md5 online encryption and sha1 online encyption. just type a password what you want to change . and copy that hash into your database admin table on password field.

6
  • How to check which encryption method is used? The script also uses bootstrap
    – Power
    Mar 7, 2016 at 12:06
  • when you enter login from database .. the method which get hit .. there will you find a code which encryption is using
    – santosh
    Mar 7, 2016 at 12:08
  • could you please search for md5 or sha1 for entire folder ...?? you will find that.. if you could share a code i can help..
    – santosh
    Mar 7, 2016 at 12:10
  • Passwords should be encrypted. Pls be more specific as to how the OP can resolve the issue because in its current form this feels more like a comment, than an answer.
    – Shadow
    Mar 7, 2016 at 12:10
  • 1
    YESSS, it was in md5. I've just replaced password field value with a new encrypted password using your link and I finallly logged into website!!!!
    – Power
    Mar 7, 2016 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.