Page 1 of 1

Help needed accessing Blog administration

Posted: Tue Oct 19, 2010 2:00 pm
by FUZZYFM
Hi there:

This is a pain, I know, but having bough a new PC, all my password settings have been lost.

Normally I would go to my blog page and the access administration (or edit) links would show. From there I would have direct access to my blog layout etc ...

However, this previously automated process has now defaulted to "enter username and password"

Is there any way to fetch this information, or am I completely up the creek now?

Regards

Re: Help needed accessing Blog administration

Posted: Tue Oct 19, 2010 2:50 pm
by yellowled
FUZZYFM wrote:Is there any way to fetch this information, or am I completely up the creek now?
http://board.s9y.org/viewtopic.php?p=77136

YL

Re: Help needed accessing Blog administration

Posted: Tue Oct 19, 2010 4:49 pm
by FUZZYFM
The search suggested by the linked post brought up over 20,000 hits in the database!

If Don Chambers is reading this, I believe he has my FTP access information to Fuzzyfm.com

(DON: I have replaced my PC and am struggling to get into Serendipity admin at Fuzzyfm.com)

TIA

Trevor Dawson

Re: Help needed accessing Blog administration

Posted: Tue Oct 19, 2010 9:01 pm
by FUZZYFM
Good so far - thanks

I have copied the script below into the PHP document using notepad++ and uploaded it to my Serendipity directory (with 'mypassword' replaced by 'xxxxxxxxxx')

(Do the ' and ' parts constitute part of the password in this script?)

<?php
include 'serendipity_config.inc.php';
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET password = md5('mypassword')");
?>


I then navigated to http://fuzzyfm.com/serendipity/script.php

(a blank page appeared) - I assume the script has run and my new password is set.

Somehow I still cant access Serendipity admin - is there any way I can discover what username is in the database? (in case this is the reason I still cant access)

TIA

Trevor

Re: Help needed accessing Blog administration

Posted: Wed Oct 20, 2010 2:00 pm
by garvinhicking
Hi!

The better script for Serendipity >= 1.5 is actually this one:

Code: Select all

<?php
include 'serendipity_config.inc.php';
$new_password = 'ENTER_NEW_PASSWORD_HERE!';
$username = 'John Doe';
echo serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors 
                                    SET hashtype = 1, password = '" . serendipity_hash($new_password) . "'" . (!empty($username) ? " WHERE username = '" . $username . "'" : '');
echo "New password set for $username";
echo "Usernames: ";
$users = serendipity_db_query("SELECT username FROM {$serendipity['dbPrefix']}authors ");
foreach($users AS $user) { echo $user['username'] . "<br />\n"; }
?>
You must enter your username in $username, and your new password in $new_password and then run the script. If you do not remember your username, you can set $username = '' and the passwords of *ALL* users are set to the new password. Plus, you get a list of all available usernames in the script, so that might help you to recover your real username. ;)

HTH,
Garvin

Re: Help needed accessing Blog administration

Posted: Sat Oct 23, 2010 11:58 am
by FUZZYFM
Oh excellent Garvin - Thanks.

Been away for a few days but I am going to try that script right now

Cheers

Trevor

Re: Help needed accessing Blog administration

Posted: Sun Oct 24, 2010 6:47 pm
by FUZZYFM
OK. Really stupid question time ....

I uploaded the above script as a file "script.php" to the serendipity area of my server

I then navigate to the script using my browser, right?

in my case this is http://fuzzyfm.com/serendipity/script.php

I was expecting something to happen ... can anyone help from here?

Thanks

Trevor

Re: Help needed accessing Blog administration

Posted: Mon Oct 25, 2010 7:26 pm
by garvinhicking
Hi!

I'm terribly sorry; a typo got into the script. The proper one is this:

Code: Select all

<?php
include 'serendipity_config.inc.php';
$new_password = 'ENTER_NEW_PASSWORD_HERE!';
$username = 'John Doe';
echo serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors 
                                    SET hashtype = 1, password = '" . serendipity_hash($new_password) . "'" . (!empty($username) ? " WHERE username = '" . $username . "'" : ''));
echo "New password set for $username";
echo "Usernames: ";
$users = serendipity_db_query("SELECT username FROM {$serendipity['dbPrefix']}authors ");
foreach($users AS $user) { echo $user['username'] . "<br />\n"; }
?>
A ")" was missing at the end of line 6.

Regards,
Garvin