Help needed accessing Blog administration

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
FUZZYFM
Regular
Posts: 5
Joined: Tue Oct 19, 2010 1:56 pm

Help needed accessing Blog administration

Post 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
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Help needed accessing Blog administration

Post 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
FUZZYFM
Regular
Posts: 5
Joined: Tue Oct 19, 2010 1:56 pm

Re: Help needed accessing Blog administration

Post 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
FUZZYFM
Regular
Posts: 5
Joined: Tue Oct 19, 2010 1:56 pm

Re: Help needed accessing Blog administration

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Help needed accessing Blog administration

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
FUZZYFM
Regular
Posts: 5
Joined: Tue Oct 19, 2010 1:56 pm

Re: Help needed accessing Blog administration

Post by FUZZYFM »

Oh excellent Garvin - Thanks.

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

Cheers

Trevor
FUZZYFM
Regular
Posts: 5
Joined: Tue Oct 19, 2010 1:56 pm

Re: Help needed accessing Blog administration

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Help needed accessing Blog administration

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply