MySQL query failed Table psa.lockout doesn’t exist

MySQL query failed Table psa.lockout doesn’t exist.

This issue can arise after an upgrade of Plesk 9.5 on attempt at logging in to the Plesk panel, you get the following error.

MySQL query failed: Table ‘psa.lockout’ doesn’t exist

0: common_func.php3:206
db_query(string ‘delete from lockout where (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(last_wrong)) > (30 * 60)’)
1: cmd_loginup.php:82
createSession(string ‘admin’, string ‘********’)
2: login_up.php3:22

Part of the Plesk login process checks if the account is locked or not and is missing after the upgrade (I suspect security updates).

The fix is simple just recreate the table.

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

mysql> CREATE TABLE `lockout` (
-> `login` varchar(20) character set utf8 NOT NULL default ”,
-> `last_wrong` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-> `attempts` int(11) NOT NULL default ‘1’,
-> PRIMARY KEY (`login`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
-> ;

Parallels dev could have added this to the login function after the upgrade, but fair play to them or at least benefit of the doubt it could leave the panel open to exploitation If they had. For example brute force and/or MySQL injection. Those kind of exploits could grant a Plesk login and is practically root at web server level but it could also be used to escalate higher privilages.

Linux, MySQL, Plesk Linux, Virtual & Dedicated Servers

Leave a Reply

Your email address will not be published. Required fields are marked *

14 − 14 =