Ad Widget

Collapse

Can't login with admin after DB upgrade

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zuercher
    Junior Member
    • Apr 2009
    • 11

    #1

    Can't login with admin after DB upgrade

    Hello

    I hope anyone has a idea which can help me.

    After the errorless upgrade of my DB (DBName= zabbix2) from 1.1.4 to 1.4.2 to 1.6.4 I can't login at Zabbix at the PHP Frontend.

    I know that Zabbix 1.6.4 don't accept an empty admin password. But both passwords, the old one from verson 1.1.4 and default from version 1.6.4 (zabbix) aren't correct. I become every time the message:

    ERROR: Login name or password is incorrect

    How can I access my Zabbix Frontend?

    Kind regards, Z.
  • Zuercher
    Junior Member
    • Apr 2009
    • 11

    #2
    Good morning

    No one here who has an idea which can help me? I still have the same problems.

    Comment

    • rue
      Member
      Zabbix Certified Specialist
      • May 2006
      • 43

      #3
      Originally posted by Zuercher
      Good morning

      No one here who has an idea which can help me? I still have the same problems.
      Well, you could change the password entry in the users table in zabbix database directly.

      You can find the appropriate hash value for the default password in the in <zbx-src>/create/data/data.sql . (actually definition of users table is right at the beginning of the file)

      Just copy and paste that into your "live" database users table, login with default values and change password via gui again... .

      Cheers

      Comment

      • Zuercher
        Junior Member
        • Apr 2009
        • 11

        #4
        Hello Rü

        Thank you for your help.

        I copied the hash value from data.sql into my database. After them I have restarted my server. Unfortunately the default password zabbix doesn't work.

        Any other idea which can help me?

        Regards, Z.

        Comment

        • Zuercher
          Junior Member
          • Apr 2009
          • 11

          #5
          I have some new findings.

          Smart as I am , I created in the table users a new user named "boss". He has the same password or hash value like the default administrator. But even with this user, I can't login. I always get the same error.

          Then I have try the same step one the default database "zabbix" which will create when zabbix was installed. And here the login with "boss" works.

          Hope anyone can help me. I have no idea what I can do now.
          Regards, Z.

          Comment

          • Aly
            ZABBIX developer
            • May 2007
            • 1126

            #6
            Hmm very odd issue, damp table users from newly created DB and import it to DB you use?
            Zabbix | ex GUI developer

            Comment

            • rue
              Member
              Zabbix Certified Specialist
              • May 2006
              • 43

              #7
              Originally posted by Zuercher
              I have some new findings.
              Then I have try the same step one the default database "zabbix" which will create when zabbix was installed. And here the login with "boss" works.
              Just a thought: DB instance in server-config (zabbix_server.conf) and in GUI-config (zabbix.conf.php) are the same, are they?

              cheers

              Last edited by rue; 12-05-2009, 11:10. Reason: typo corrected...

              Comment

              • Zuercher
                Junior Member
                • Apr 2009
                • 11

                #8
                Hello
                Yes I mean, the both entries are the same.

                zabbix_server.conf > DBName=zabbix2
                zabbix.conf.php > $DB["DATABASE"] = "zabbix2";

                Every time when I change between the two databases I must change this values in the two conf-files.

                Regards, Z.

                Comment

                • Zuercher
                  Junior Member
                  • Apr 2009
                  • 11

                  #9
                  Originally posted by Aly
                  ... damp table users from newly created DB and import it to DB you use?
                  How can I damp one tabel and import it to the new DB? I am a newbie with databases.

                  Another quiestion.
                  When I compare the newly created DB with the updated DB, I find in both the tables: users, uers_groups and usrgrp.
                  In users the values a seams to be identical. In usergrp are different values in the table. In the new DB exists 9 groups, in the updated one only 8.
                  Finaly, in user_groups from the updated dB, they aren't any values, that means the table ist empty. In the newDB I have 2 entries.

                  How does the login works for zabbix? Are there any dependencies with tabels in the DB which in the new DB not being met?

                  As I see the situation, I have only a problem with the login on the GUI from zabbix.

                  Regards, Z.

                  Comment

                  • Zuercher
                    Junior Member
                    • Apr 2009
                    • 11

                    #10
                    Hello
                    No one here who has an idea which can help me?
                    Regards, Z.

                    Comment

                    • Aly
                      ZABBIX developer
                      • May 2007
                      • 1126

                      #11
                      Two main tables for user to login is "sessions" and "users", try checking if they match to newly created DB tables..

                      CREATE A BACKUP BEFORE!!!!
                      I have attached a sql script, which you need to execute to drop your current users, and create DB tables from scratch. With default entries.
                      I haven't tested it but it should work
                      CREATE A BACKUP BEFORE!!!!

                      If that doesn't help, the only thing that comes on mind is that your frontend files doesn't match original ones, in that case download frontend from our developrs section, and replace your frontend with downloaded: http://www.zabbix.com/developers.php
                      Attached Files
                      Zabbix | ex GUI developer

                      Comment

                      • Zuercher
                        Junior Member
                        • Apr 2009
                        • 11

                        #12
                        Hello Aly

                        Thanks for your help. I have execute your script and get the following error:

                        ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE IF EXISTS `config`' at line 1

                        As solution I have execute each statement direct in mysql. Unfortunately, I still can't login at zabbix. Still the same error.

                        How you have explained, I downloaded the last version from the developers section and replaced all the files for the frontend under ./home/zabbix/public_html. Befor, I deleted the old files, with the exception of the file zabbix.conf.php. This file a copied to his place after I have copied the new frontend files. After the restart of the server, I get unfortunately still the same error.

                        As an idea I want to rebuild the zabbix.conf.php. Under http://servername/zabbix/setup.php i get the message: ERROR: No permissions!

                        Any other idea what we can do? Is there a way to backup an restore each table from one database to the other where the login works correct? And with which tables should I do that?

                        Regards, Z.

                        Comment

                        • Aly
                          ZABBIX developer
                          • May 2007
                          • 1126

                          #13
                          The only thing is left is debugging.. page_header contains several calls of function access_deny(), find which triggers permission deny, while opening setup.php script.
                          Zabbix | ex GUI developer

                          Comment

                          • rue
                            Member
                            Zabbix Certified Specialist
                            • May 2006
                            • 43

                            #14
                            Originally posted by Zuercher
                            As an idea I want to rebuild the zabbix.conf.php. Under http://servername/zabbix/setup.php i get the message: ERROR: No permissions!
                            Looks like apache doesn't want to show the updated frontend. Check apache error log and adjust permissions appropriately ....

                            Cheers

                            Comment

                            • dobber
                              Junior Member
                              • Jun 2009
                              • 1

                              #15
                              I had this same issue after doing two consecutive database upgrades from 1.1.4 to 1.4.4 to 1.6.4. I found that the upgrades left the users_groups table empty, which was causing login to fail. I input the default users_groups table entries that are used in the fresh install data and could login normally.

                              Comment

                              Working...