Ad Widget

Collapse

Incorrect user name or password or account is temporarily blocked.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hcx23
    Junior Member
    • Nov 2021
    • 21

    #1

    Incorrect user name or password or account is temporarily blocked.

    Hi, I have a huge problem - I can't log in on my zabbbix6.4 anymore. I had zabbix running on mariadb10 and wanted to set up an http to https redirect on my Apache2. My OS is Ubuntu 22.04. I tried the following several times.
    Code:
    Code:
    update users set passwd='' where name='Admin';
    Query OK, 0 rows affected (0,000 sec)
    Rows matched: 0 Changed: 0 Warnings: 0
    Code:
    MariaDB [zabbix]> update users set passwd=md5('password') where name='Admin';
    Query OK, 0 rows affected (0,000 sec)
    Rows matched: 0 Changed: 0 Warnings: 0
    Code:
    MariaDB [zabbix]> update users set passwd=md5('password') where name='Zabbix';
    Query OK, 1 row affected (0.002 sec)
    Rows matched: 1 Changed: 1 Warnings: 0
    The webfrontend does not accept password as admin or admin. I have reinstalled both the zabbix database and zabbix . I have backed up the original configuration before. Also i tried to give admin the same password as guest :
    Code:
    Code:
    UPDATE zabbix.users AS a INNER JOIN zabbix.users AS b ON b.username='Admin' SET a.passwd = b.passwd;
    None of this helped. What else could I try ? THANKS in advance.


  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    md5 is wrong ... there is bcrypt nowadays... You should be able to find that "set admin passwd to gues passwd" query from this forum...
    https://www.zabbix.com/forum/zabbix-...522#post458522
    suggests
    UPDATE zabbix.users AS a INNER JOIN zabbix.users AS b ON b.username='guest' SET a.passwd = b.passwd;​​
    Thats a bit different from yours... basically setting everyones password to empty, like guest....

    But I don't see, how moving from http to https would affect any of the passwords..

    Comment

    • hcx23
      Junior Member
      • Nov 2021
      • 21

      #3
      Hi cyber,

      thanks but both does not work:
      Code:
      update users set passwd=bcrypt('password') where name='Admin';
      ERROR 1305 (42000): FUNCTION zabbix.bcrypt does not exist
      ​
      I further tried:
      Code:
      select * from users' at line 1
      MariaDB [zabbix]> select * from users;
      +--------+----------+--------+---------------+----------------------------------+-----+-----------+------------+---------+---------+---------+----------------+---------------+---------------+---------------+----------+--------+-----------------+----------------+
      | userid | username | name | surname | passwd | url | autologin | autologout | lang | refresh | theme | attempt_failed | attempt_ip | attempt_clock | rows_per_page | timezone | roleid | userdirectoryid | ts_provisioned |
      +--------+----------+--------+---------------+----------------------------------+-----+-----------+------------+---------+---------+---------+----------------+---------------+---------------+---------------+----------+--------+-----------------+----------------+
      | 1 | Admin | Zabbix | Administrator | 5f4dcc3b5aa765d61d8327deb882cf99 | | 1 | 0 | default | 30s | default | 9 | 89.39.107.204 | 1680017557 | 50 | default | 3 | NULL | 0 |
      | 2 | guest | | | 5f4dcc3b5aa765d61d8327deb882cf99 | | 0 | 15m | default | 30s | default | 0 | | 0 | 50 | default | 4 | NULL |
      and then:
      Code:
      update users set passwd=('5f4dcc3b5aa765d61d8327deb882cf99') where username='Admin';
      Query OK, 0 rows affected (0,000 sec)
      Rows matched: 1 Changed: 0 Warnings: 0
      That also does not work.
      • Incorrect user name or password or account is temporarily blocked.

      ​​
      Regards, hcx

      Comment


      • tim.mooney
        tim.mooney commented
        Editing a comment
        If you look at what you posted originally, every single place you tried "where name='Admin';", the output says "Rows matched: 0, Changed:0". In other words, your query didn't match anything.

        If you look at the table, 'user' is *not* equal to 'Admin' (user is Administrator). You want "username='Admin'", not "user='Admin'";
    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #4
      I did not say, that bcrypt as a function exists in DB engine..

      But here's the method to generate correctly encoded password https://www.zabbix.com/forum/zabbix-...zabbix-lts-5-0


      YourNewPassword -> $2y$10$cNkvka5XyaF7uAu74CkdPuHf6s4/JXDyhHaD7FIVyX6PB9gb1XjZS​
      Last edited by cyber; 29-03-2023, 09:10.

      Comment

      • hcx23
        Junior Member
        • Nov 2021
        • 21

        #5
        Hi cyber, I just tried with:

        Code:
        update users set passwd='$2y$10$gzC/87rnOvDHg/WX06qVOukEuB.A2.yn/FPlGDyr2qx3J15FgrWxy' where username='Admin';


        ​but the same result : Incorrect user name or password or account is temporarily blocked. I have no further idea

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #6
          ok .. maybe its not the issue of wrong password...
          https://www.zabbix.com/documentation...cked%2Cblocked
          A user can become temporarily blocked upon exceeding the number of unsuccessful login attempts set in the Administration → General → Other section (five by default)
          you have 9 failed attempts there... maybe more by now...

          try
          Code:
          update users set attempt_failed = 0 where username = 'Admin';

          Comment

          • hcx23
            Junior Member
            • Nov 2021
            • 21

            #7
            Hi cyber, THANKS that worked obviouisly.

            Code:
            update users set attempt_failed = 0 where username = 'Admin';
            Query OK, 0 rows affected (0,001 sec)
            Rows matched: 1 Changed: 0 Warnings: 0
            
            MariaDB [zabbix]> exit
            ​
            But how to login now with which password?

            Regards hcx,

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #8
              hm... 0 rows affected? Should be 1...

              Comment

              • hcx23
                Junior Member
                • Nov 2021
                • 21

                #9
                Hi cyber, sorry but that is all I have to offer:
                Code:
                update users set attempt_failed = 0 where username = 'Admin';
                Query OK, 0 rows affected (0,000 sec)
                Rows matched: 1 Changed: 0 Warnings: 0

                I have no more ideas. Regards uli

                Comment

                • somesh_k
                  Junior Member
                  • Feb 2023
                  • 12

                  #10
                  HI cyber, hcx23 ,

                  I am also facing the same issue for one user and for other users it is working fine. Zabbix v6.2 & postgresql 14.6

                  Click image for larger version

Name:	image.png
Views:	29759
Size:	17.9 KB
ID:	463212


                  zabbix=# select * from users where userid=8;
                  userid | username | name | surname | passwd | url | autologin | autologout
                  | lang | refresh | theme | attempt_failed | attempt_ip | attempt_clock | rows_per_page | timezone | roleid
                  --------+----------+----------+---------+--------------------------------------------------------------+-----+-----------+------------
                  +---------+---------+---------+----------------+------------+---------------+---------------+----------+--------
                  8 | AB_User0 | AB_User0 | | $2y$10$vupx7wNPI/.EtGDfgx4meONrMcxc8OBmfUj9Z5vd4lw8X1TcCsahky | | 1 | 0
                  | default | 30s | default | 2 | 10.68.62.7 | 1681882084 | 50 | default | 2
                  (1 row)

                  Thanks in advance

                  Comment

                  • blake.chen
                    Junior Member
                    • Apr 2023
                    • 2

                    #11
                    zabbix_server (Zabbix) 6.2.9

                    try
                    Code:
                    update users set passwd='$2y$10$92nDno4n0Zm7Ej7Jfsz8WukBfgSS/U0QkIuu8WkJPihXBb2A1UrEK' where username='Admin';
                    Admin / zabbix

                    Comment

                    • somesh_k
                      Junior Member
                      • Feb 2023
                      • 12

                      #12
                      Hi blake.chen, I have updated the same in the database but still getting "Incorrect user name or password or account is temporarily blocked."

                      step 1: htpasswd -bnBC 10 "" abc@2aen02 | tr -d ':'

                      Query:: update users set passwd='$2y$10$6tyHimIvSwvvkCSd0cfFMeIQ/PrgGy7wsdHoBvy34fmC9s2Jt25u2' where username='AB_User2';

                      Comment

                      • blake.chen
                        Junior Member
                        • Apr 2023
                        • 2

                        #13
                        Code:
                        update users set passwd='$2y$10$lfYTgg92AJqi4wYkKjg2gOuB6uPSOPfQIPi1ilZt0kbDLAzD9vek6' where username='AB_User2';

                        Comment

                        Working...