Author user error on login

Found a bug? Tell us!!
Post Reply
xtreem99
Posts: 1
Joined: Fri Dec 23, 2016 10:24 pm

Author user error on login

Post by xtreem99 »

hello,
I have read through a handfull of similar posts, but none has my exact problem.
Serendipity has been installed for several months now, working just fine, until i tried to login to submit another new blog post taday and it just denied access. .
the error is:
"You appear to have entered an invalid username or password"
the blogsite is up and running fine, all blogs visible, no problem there, but I cannot login.


Things i have tried in MYPHPADMIN through CP:

in MYPHPADMIN added new user,pass, etc in serendipity_authors
does not work.
used MD5 with Hash, without Hash,
SHA1 with hash, and without hash
plaintext, with hash and without
did not work
all userlevel combinations 255 and 0.
deleted all users, added new,
still not able to login.
any thoughts?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Author user error on login

Post by garvinhicking »

Hi!

The best way to reset your user account is to use this script:

Code: Select all

<?php
$username = "yourusername";
$password = "yournewpassword";
include 'serendipity_config.inc.php';
echo serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET password = '" . serendipity_hash($password) . "', hashtype=1 WHERE username = '" . serendipity_db_escape_string($username) . "'");
echo "Password changed.";
You can save that as "fixauthor.php" or something like that and call it in your blog's directory, it will then save the new password for the user.

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/
Karbargenbok
Regular
Posts: 7
Joined: Thu Apr 13, 2017 9:28 pm

Re: Author user error on login

Post by Karbargenbok »

garvinhicking wrote:Hi!

The best way to reset your user account is to use this script:

Code: Select all

<?php
$username = "yourusername";
$password = "yournewpassword";
include 'serendipity_config.inc.php';
echo serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET password = '" . serendipity_hash($password) . "', hashtype=1 WHERE username = '" . serendipity_db_escape_string($username) . "'");
echo "Password changed.";
You can save that as "fixauthor.php" or something like that and call it in your blog's directory, it will then save the new password for the user.

Regards,
Garvin
I have been trying this, but it doesn't seem to be working. The error code I get is

Code: Select all

Unknown column 'hashtype' in 'field list'Password changed.
The blog is at http://wumswebsite.nl/wumlog/.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Author user error on login

Post by garvinhicking »

Hi!

That means your blog is running an old database version which did not have "hashtype" as a column yet. That would mean at some point you did not execute the database upgrader script as intended.

This column was added in serendipity 1.5-alpha1 to 1.5-alpha2 already, so from what blog version did you upgrade? Maybe you missed some steps, or did you get upgrade errors when you did that?

You can check the necessary DB upgrade file sin the sql/db_update*mysql.sql files, in your case you would need to at least execute this in a tool like phpMyAdmin:

Code: Select all

ALTER TABLE serendipity_authors ADD COLUMN hashtype int(1);
ALTER TABLE serendipity_authors CHANGE password password VARCHAR(64) NOT NULL;
You can force re-executing update scripts also by editing your serendipity_config_local.inc.php file and setting the versionInstalled string there to one of the earlier versions (like 1.5). That would re-execute several DB tasks, so make sure you create a SQL and file backup before you do that. Usually the actions can be performed multiple times without breaking things, but a backup is always good.

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/
Post Reply