Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: DanB35 on December 12, 2014, 11:37:50 PM
-
I've installed smeserver-phpmyadmin following http://wiki.contribs.org/PHPMyAdmin on my SME 9.0 server. Installation went without issues, I did signal-event post-upgrade and signal-event reboot, and now I don't seem to be able to log in. I have not changed any of the default settings.
When I browse to myserver/phpmyadmin, I first get a popup HTTP authentication window asking for a username and password. I enter admin and the server's admin password. I'm then taken to the phpMyAdmin login page, where it again asks for a username and password. I again enter admin and the server admin password, and click Go. The screen refreshes with a red box near the top saying "#1045 Cannot log in to the MySQL server." There are no entries in /var/log/messages or /var/log/mysqld/current that seem related.
"config show phpmyadmin" shows a property of DbPassword with a lengthy, random value. /root/.my.cnf has a lengthy random password as well, but it doesn't match the one shown for DbPassword. When I do "mysql -u root -p" and enter the first password, it doesn't work; when I enter the password in /root/.my.cnf it does (as expected). I suspect this is the source of the problem.
The simple answer, I think, is to do "config setprop phpmyadmin DbPassword <password from /root/.my.cnf>". Is there a reason I shouldn't do this?
-
not sure that phpmyadmin is in fault, check if the the group apache gets the correct ownership
here my output
[root@sme9 ~]# groups apache
apache : www backuppc
[root@sme9 ~]# id apache
uid=102(www) gid=102(www) groupes=102(www),393(backuppc)
[root@sme9 ~]# cat /etc/group|grep apache
apache:x:102:
backuppc:x:393:apache
[root@sme9 ~]# ll /usr/bin/pwauth
-rwsr-x--- 1 root www 7820 5 juin 2013 /usr/bin/pwauth
the correct password for the admin authentication is the admin password of your smeserver, but I have done a power user in phpmyadmin 'sqladmin' whose the password is registered in the db of phpmyadmin
the admin authentification is done with apache and pwauth
the sqladmin is a pure phpmyadmin authentication and needs to enable the multi-user access.
I suppose that your sme9 is restored from a backup of sme8 ?
-
Yes, my server was restored from SME 8.1.
[root@e-smith ~]# groups apache
apache : www
[root@e-smith ~]# id apache
uid=102(apache) gid=102(www) groups=102(www)
[root@e-smith ~]# grep apache /etc/group
apache:x:48:
[root@e-smith ~]# ll /usr/bin/pwauth
-rwsr-x--- 1 root www 11032 Jun 4 2013 /usr/bin/pwauth
-
Same issue.
My server was restored from sme 8.1
[root@fwbox ~]# groups apache
apache : www
[root@fwbox ~]# id apache
uid=102(apache) gid=102(www) groups=102(www)
[root@fwbox ~]# cat /etc/group|grep apaches
[root@fwbox ~]# cat /etc/group|grep apache
apache:x:102:
[root@fwbox ~]# ll /usr/bin/pwauth
-rwsr-x--- 1 root www 11032 Jun 5 2013 /usr/bin/pwauth
If I used the password from /etc/phpMyAdmin/config.inc.php
# standalone login part
if ($scriptpath=="/phpmyadmin/" && $_SERVER['PHP_AUTH_USER']=='admin')
{
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'this password worked';
}
# end of standalone login part
then I could log in. It is as though either the config.inc.php isn't parsed by phpMyAdmin or the code isn't being executed for some reason.
-
Yes, my server was restored from SME 8.1.
[root@e-smith ~]# groups apache
apache : www
[root@e-smith ~]# id apache
uid=102(apache) gid=102(www) groups=102(www)
[root@e-smith ~]# grep apache /etc/group
apache:x:48:
[root@e-smith ~]# ll /usr/bin/pwauth
-rwsr-x--- 1 root www 11032 Jun 4 2013 /usr/bin/pwauth
you have the bug http://bugs.contribs.org/show_bug.cgi?id=8549
groupmod -o -g 102 apache
if you have tricked the phpmyadmin db, please remove the rpm, remove the phpmyadmin mysql database, remove the phpmyadmin db and then reinstall phpmyadmin, else restart your server
-
Same issue.
My server was restored from sme 8.1
[root@fwbox ~]# groups apache
apache : www
[root@fwbox ~]# id apache
uid=102(apache) gid=102(www) groups=102(www)
[root@fwbox ~]# cat /etc/group|grep apaches
[root@fwbox ~]# cat /etc/group|grep apache
apache:x:102:
[root@fwbox ~]# ll /usr/bin/pwauth
-rwsr-x--- 1 root www 11032 Jun 5 2013 /usr/bin/pwauth
If I used the password from /etc/phpMyAdmin/config.inc.php
# standalone login part
if ($scriptpath=="/phpmyadmin/" && $_SERVER['PHP_AUTH_USER']=='admin')
{
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'this password worked';
}
# end of standalone login part
then I could log in. It is as though either the config.inc.php isn't parsed by phpMyAdmin or the code isn't being executed for some reason.
??
you are saying that in the prompt of apache authentication you gave the mysql password that you cant retrieve in /etc/openldap/ldap.pw with the user admin.
That's is not possible :/
where have you used this password, in the phpmyadmin prompt ?, what is the user you gave ?
here ownership of my configuration file
# ll /etc/phpMyAdmin/config.inc.php
-rw-r----- 1 root www 3224 8 déc. 20:43 /etc/phpMyAdmin/config.inc.php
-
Initial logon at the apache prompt is:
username: admin
password: my servers admin password
This brings up the logon screen from myphpadmin
If I try and login to myphpadmin using the above credentials it fails as per the original post "#1045 Cannot log in to the MySQL server."
If I then logon onto the phpmyadmin using:
username: root
password: password from /etc/myphpadmin/config.inc.php $cfg['Servers'][$i]['password'] = 'this password worked';
I can login to myphpadmin
[root@fwbox ~]# ll /etc/phpMyAdmin/config.inc.php
-rw-r----- 1 root www 3091 Nov 24 17:35 /etc/phpMyAdmin/config.inc.php
Adding some debug around here:
if ($scriptpath=="/phpmyadmin/" && $_SERVER['PHP_AUTH_USER']=='admin')
would help pinpoint if there is an issue with getting to this point where the authentication is translated from admin to root.
I had problems with my brute force logging debug and haven't progressed any further.
-
no hints in
/var/log/messages
/var/log/httpd/error_log
it seems that the apache authentication fails
-
No hints in either log.
admin logon works for server manager and phpvirtualbox.
-
groupmod -o -g 102 apache
if you have tricked the phpmyadmin db, please remove the rpm, remove the phpmyadmin mysql database, remove the phpmyadmin db and then reinstall phpmyadmin, else restart your server
I have not made any changes to the config db entries for phpmyadmin. I issued the groupmod command, did signal-event post-upgrade && signal-event reboot, and tried to log in again. Same result--the apache authentication appears to succeed (or at least, no error is reported), but the phpmyadmin authentication does not. For both, I'm using admin/server admin password.
Next step was yum erase phpmyadmin smeserver-phpmyadmin, config delete phpmyadmin, yum --enablerepo=epel,stephdl install smeserver-phpmyadmin. Followed with post-upgrade and reboot. Now, success.
Is there anything I should check before I mark this solved?
-
Please report in the bug report your issues, the output of commands related to group ownership and commands that you did for solving it
Please give all available details and add the mention that you did an upgrade from sme8 with the backup restoration
-
No hints in either log.
admin logon works for server manager and phpvirtualbox.
If it works for phpvirtualbox, then it should work for phpmyadmin, pwauth is used also for the apache authentication
Try to do what dan did, remove all settings and reinstall
-
By the way, 64 bit or 32 bit your sme9 ?
-
64 bit.
Complete uninstall, reboot, new install, reboot and its now working as expected.
There have been a couple of updates over the last week or so the sme that have sorted out some issues since I last tried to debug this. Some combination of the above appears to have successfully resolved my issue.
Thanks for your help and efforts with the package.
-
Are you saying that it worked and after a bunch of updates it stopped to work ?
I'm happy that the issue can be solved but there is something odd....anyway if you want to thank someone....it is not me only, but a team....and you are welcome to join it.
Just need to love working with others....all skill needed
-
Sequence of events:
sme 8.1 with phymyadmin working ok.
Backed up sme 8.1 via backup to usb
Clean install sme 9
restored backup
Had some LDAP issues.
Installed phpmyadmin and had problem described above.
applied various updates to sme 9
Still had problem with phpmyadmin.
Followed process above with complete uninstall of phpmyadmin
reinstalled phpmyadmin
all good
said thanks :)