HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   accounts can't login since resetting my MySQL root password (http://www.howtoforge.com/forums/showthread.php?t=54627)

mistr_e 24th October 2011 15:32

accounts can't login since resetting my MySQL root password
 
I am running ISPConfig 3 under CentOS and I had to manually reset my MySQL root account password yesterday. Since resetting the password I haven't been able to login to ISPConfig's web interface with any account including my admin one.

If I try to login with username: admin and my password I get Error Username or Password wrong.

I reset my MySQL root password.

Code:

mysqladmin -u root -p'oldpass' password 'roottest'
I logged into MySQL and reset admin password to test.

Code:

mysql -u root -p'roottest'
mysql> use dbispconfig;
mysql> database changed
mysql> update sys_user set passwort = md5('admintest') WHERE username = 'admin';
Query OK, 1 row affected (0.07 sec)
Rows matched: 1  Changed: 1  Warnings: 0

I changed my mysql_clientdb.conf to the new password.

Code:

vi /usr/local/ispconfig/server/lib/mysql_clientdb.conf
<?php
$clientdb_host                  = 'localhost';
$clientdb_user                  = 'root';
$clientdb_password              = 'roottest';
?>

I couldn't find a way to restart ISPConfig 3 after these changes, or if it's even possible.

The same error from the ISPConfig login page still shows up when trying to login with u: admin p: admintest.


Help me ISPConfig community, you're my only hope.

till 24th October 2011 16:58

The mysql root password is not used for user authentication in the ispconfig interface. ISPConfig connects to mysql with the user "ispconfig" and not root. The root user is only used to create new client databases. Have you changed the password of the ispconfig mysql user too?

Quote:

I couldn't find a way to restart ISPConfig 3 after these changes, or if it's even possible.
ispconfig is no daemon, so it has not to be restarted.

mistr_e 24th October 2011 17:10

Quote:

The mysql root password is not used for user authentication in the ispconfig interface. ISPConfig connects to mysql with the user "ispconfig" and not root. The root user is only used to create new client databases. Have you changed the password of the ispconfig mysql user too?
I'm pretty sure I may have at some point.
Should I change the ispconfig mysql password using
Code:

update user set Password=PASSWORD('mynewpassword') WHERE User='ispconfig';
Do I need to update an ISPConfig file somewhere when I do?

till 24th October 2011 17:33

Quote:

Should I change the ispconfig mysql password using
Code:
update user set Password=PASSWORD('mynewpassword') WHERE User='ispconfig';
Do I need to update an ISPConfig file somewhere when I do?
Thats the wrong way.

You should set back the password in mysql to the old value as it is stored in many files. You find the original password in the file /usr/local/ispconfig/interface/lib/config.inc.php

mistr_e 24th October 2011 17:35

SOLVED

I updated the MySQL ispconfig user password by connecting to mysql and running the sql to change the password.

Code:

mysql -u root mysql
mysql> update sys_user set passwort = md5('isptest') WHERE username = 'ispconfig';

Then I typed the same password into an MD5 generator http://www.iwebtool.com/md5.

I pasted that MD5 password into my config.inc.php file.
Code:

vi /usr/local/ispconfig/server/lib/config.inc.php
$conf['db_password'] = 'PASTEDMD5PASSWORD';

I can now login to ispconfig.
Thank you for your help.

mistr_e 24th October 2011 17:42

OHHH, are you saying that long encrypted looking password on the line
Code:

$config['db_password']='LONGPASSWORDSTRING';
isn't an encrypted password? That it is the plain text password that should set for the ispconfig user?

So should I update the mysql ispconfig user with this?
Code:

update user set Password=PASSWORD('LONGPASSWORDSTRING') WHERE User='ispconfig';

till 24th October 2011 18:36

Quote:

That it is the plain text password that should set for the ispconfig user?
Thats the plaintext password.

mistr_e 24th October 2011 18:59

While my solution worked I used the password already found in that config file instead as you suggested. Thank you again for your help.


All times are GMT +2. The time now is 12:43.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.