Koozali.org: home of the SME Server

smeserver-phpmyadmin login problem

Offline jburrell

  • *
  • 7
  • +0/-0
smeserver-phpmyadmin login problem
« on: July 17, 2009, 05:24:44 AM »
My apologies if this has already been covered, I did search and found a semi-relevant thread but it did not solve my problem.

Also I apologies if this is actually a bug! I am not really familiar enough to know, if it is I will happily go add it to the bug tracker.

Anyway, I recently setup a couple of SME 7.4 servers, and then followed the wiki here :

http://wiki.contribs.org/PHPMyAdmin#Additional_information

to install phpmyadmin.

The install went fine, and the login prompt comes up ok, however it will not accept any of the logins that I have set up for these servers.

I am scratching my head a bit here, but as far as I can tell I havent missed anything according to the wiki.

Anyone able to suggest a possible solution? (or maybe something obvious I have missed?)

Thanks in advance.

Offline jburrell

  • *
  • 7
  • +0/-0
Re: smeserver-phpmyadmin login problem
« Reply #1 on: July 17, 2009, 06:40:59 AM »
Solved the problem. Wiki needs to be updated - When installed via yum as per the wiki entry, the config.inc.php file that is installed does not use any of the existing admin logins but a default random 72 character password that needs to be set to something.

After some searching through this thread : http://forums.contribs.org/index.php/topic,42582.30.html

It turns out the file currently exists in /usr/share/phpmyadmin/config.inc.php



The section highlighted in red obviously needs to be set to something useable, and the wiki updated I would imagine.


Offline jburrell

  • *
  • 7
  • +0/-0
Re: smeserver-phpmyadmin login problem
« Reply #2 on: July 17, 2009, 06:52:45 AM »
ok, I speak too soon. Obviously this file is generated from a template, and I am not sure how to go about stopping it from regenerating a password that is apparently pulled from /etc/e-smith/templates/phpmyadmin/config.inc.php/10config

ldap.pw?




Offline jburrell

  • *
  • 7
  • +0/-0
Re: smeserver-phpmyadmin login problem
« Reply #3 on: July 17, 2009, 07:11:34 AM »
Ok, i'm stumped. Perhaps the root password for for phpmyadmin is set to thie arbitrary 72 character password on initial install and I need to change it somewhere else.

help anyone?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: smeserver-phpmyadmin login problem
« Reply #4 on: July 17, 2009, 01:06:07 PM »
Ok, i'm stumped. Perhaps the root password for for phpmyadmin is set to thie arbitrary 72 character password on initial install and I need to change it somewhere else.

help anyone?
No, it is the mysql root user password, which you should not modify. More on the MySQL root user is here: http://wiki.contribs.org/MySQL#MySQL_root_password

You need to carefully read the section you referred to yourself as it states (as well as the thread you posted as the clues are in there: http://forums.contribs.org/index.php/topic,42582.msg202167.html#msg202167 ):

Quote
Access with admin username/password via: https://yourdomain/phpmyadmin

Which means you need to use the username "admin" and it's password, which should be the same as the "root" password if you did not modify them after installation.
« Last Edit: July 17, 2009, 01:08:53 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline jburrell

  • *
  • 7
  • +0/-0
Re: smeserver-phpmyadmin login problem
« Reply #5 on: July 20, 2009, 01:32:39 AM »
Ok, to be clear, I havent changed passwords since install, and I did try admin initially. I only tried root when admin wouldn't work.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: smeserver-phpmyadmin login problem
« Reply #6 on: July 20, 2009, 01:06:29 PM »
jburrell

I just followed the Howto at
http://wiki.contribs.org/PHPMyAdmin#Additional_information
and it all worked perfectly.
I was able to immediately login to phpmyadmin using the main sme server admin username and password, without changing anything.


I would suggest you remove phpmyadmin and install again.
It's as simple as:
rpm -e smeserver-phpmyadmin phpmyadmin
and to "clean up" your server and ensure all settings are as correct as they can be do
signal-event post-upgrade
signal-event reboot

Then as you appear to have been playing around with the mysql password, you should reset it to the default as follows:
cd /var/service/mysqld
sv d .
expand-template /root/.my.cnf
expand-template /var/service/mysqld/set.password
/usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < ./set.password
sv u .


Then when all seems OK do:

yum --enablerepo=smecontribs install smeserver-phpmyadmin
expand-template /usr/share/phpmyadmin/config.inc.php
expand-template /etc/httpd/conf/httpd.conf
/usr/local/bin/svc -h /service/httpd-e-smith

At this point do not do any other configuration of phpmyadmin
Open a browser to
http://yourdomain.com/phpmyadmin

You should be presented with a login screen
type in the username of admin
and the password for the admin user
This is the same as the main sme server admin password.

phpmyadmin should open, if all is well.

Report back your results


I'd also say that if you want multi user access, then it's better to install phpmyadminmulti from here
http://wiki.contribs.org/Phpmyadminmulti
which I also installed and it worked perfectly the first time without changing anything.
In this case the default phpmyadmin login user = admin
and the default password is also = admin

This should be changed as advised in the Howto
mysql --execute="grant all privileges on *.* to admin@localhost identified by 'newpassword' WITH GRANT OPTION"
mysql --execute="flush privileges"

You will also need to add additional users as required , again using the mysql commands provided in the Howto (but changing the username and password as required)
« Last Edit: July 20, 2009, 02:00:11 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.