Page 1 of 2

Resetting Password

Posted: Wed Feb 18, 2009 11:33 am
by mtcheewai
Hi,
I'm not sure if anyone posted this before but I could not find it. Anyway I've changed my password few months ago (at Serendipity Blog) and I forgotten. I tried using "phpmyadmin" to access my database hopefully to changed my password BUT sadly, I can't get into that too. Is there a way I could reset my password to my Blog? Please.. I need help. Thank You :|

Re: Resetting Password

Posted: Wed Feb 18, 2009 11:59 am
by garvinhicking
Hi!

Without access to the database, you can't really change your master password.

Do you have FTP access? Then you could write a script like:

Code: Select all

<?php
include 'serendipity_config.inc.php';
serendipity_db_query("update {$serendipity['dbPrefix']}authors SET password = '" . md5('newpassword') . "' WHERE authorid = 1"):
?>
and call it in your browser. This will change the password for author #1.

Regards,
Garvin

Re: Resetting Password

Posted: Mon Feb 23, 2009 3:23 am
by mtcheewai
Hi garvinhicking,
Thanks, i manage to find a file called "serendipity_config_local.inc" through FTP which have info of my database login. I manage to access my database last weekend to changed my Blog password. Phew... sweat!
But I got another question, how do I add a so called "Forgot Password" option in my blog so I can reset in case same thing happen in future. Thanks for advice :)

Re: Resetting Password

Posted: Mon Feb 23, 2009 4:05 am
by Don Chambers
There is a "forgot password" plugin. Maybe Garvin can answer this better, but my concern is that it might not work for username/passwords created BEFORE the plugin is installed. Garvin?

Re: Resetting Password

Posted: Mon Feb 23, 2009 11:58 am
by garvinhicking
Hi!
Don Chambers wrote:There is a "forgot password" plugin. Maybe Garvin can answer this better, but my concern is that it might not work for username/passwords created BEFORE the plugin is installed. Garvin?
The plugin does not retrieve actuall passwords, it only allows you to use e-mails to reset it. So it can be used, once it's installed, to reset *any* password.

You can get the plugin through spartacus or http://spartacus.s9y.org.

Regards,
Garvin

Re: Resetting Password

Posted: Tue Feb 24, 2009 5:14 am
by mtcheewai
Hi Guys,
Thx, I manage to add the "Forgot Password" plugin to my blog. It is as what Garvin mention, I will type in my email & it will send a link to my mail. That link will bring me back to my Blog with a box to key in a new password. I won't get my old password back but I can key in a new one. I believe it works for all user as long as it matches the email.. I think.

Thanks alot for all your help :)
Take Care!

Re: Resetting Password

Posted: Sun Mar 08, 2009 2:22 pm
by JaCkAl
Hi,

I have a similar problem too. However, when I accessed the database and changed the password, it still doesn't work. The password in the database is MD5 hash though...would that still work if I typed one there?

Re: Resetting Password

Posted: Mon Mar 09, 2009 10:53 am
by garvinhicking
Hi!

You must store an MD5 hash in your serendipity_authors table. So if you choose the password "jackal" you would need to store "5da520440785b95df2c6016087c315ae" in the database, but when you login, still use the password "jackal".

You cannot login with the MD5 hash itself.

Regards,
Garvin

Re: Resetting Password

Posted: Mon Mar 09, 2009 12:44 pm
by JaCkAl
Oh ok, thanks garvin..will give that a try.

Re: Resetting Password

Posted: Sun Jun 06, 2010 6:00 pm
by Paul Sture
I having an unexpectedly hard time with this. I'm using Postgres and issue the following command at the psql prompt:

Code: Select all

update serendipity_authors set password = md5('123456') where authorid = 1;
Yet I still cannot login. Does anyone have any thoughts? I'm totally baffled here.

Re: Resetting Password

Posted: Sun Jun 06, 2010 9:28 pm
by kleinerChemiker
Which version do you use?

Re: Resetting Password

Posted: Thu Sep 16, 2010 1:29 pm
by Paul Sture
Apologies for the delayed reply.

I am using Serendipity 1.5 beta 1. I would upgrade but I am not sure I can without the password.

TIA

Re: Resetting Password

Posted: Thu Sep 16, 2010 2:06 pm
by kleinerChemiker
I think since 1.5 s9y uses sha1 for hashing.
http://board.s9y.org/viewtopic.php?f=10 ... ha1#p96580

Re: Resetting Password

Posted: Thu Sep 16, 2010 2:39 pm
by Paul Sture
Many thanks. The PHP there threw an error for me:

Code: Select all

ERROR: syntax error at or near "=" LINE 1: UPDATE SET password = 'blahblah'
It looks like the table name is missing from that statenent, which might be because I'm still on the beta version.

However, it displayed the resulting password hash value so I was able to use psql to update it with this statement:

Code: Select all

pdate serendipity_authors set password = '7ccea2e9c150e219140d842451c31986904c0060' where authorid = 1; 

Re: Resetting Password

Posted: Sun Oct 10, 2010 2:01 am
by evanslee2
After i had exported my data, deleted my old blog, and then setup a new one, and imported the new data.... the only way I could get access to my blog was to:

Create a new installation
Make a note of your new admin password and its encrypted key
Use phpmyadmin to check your hashkey serendipity > serendipity_config > hashkey

Now use the hashkey and the encrypted key in the installation you need to gain access too... then change the password for all the other users to a default one and ask them to change it ...

Obviously you will already have the required access to view the mysql database otherwise your stuffed...