Ad Widget

Collapse

Reset web front end password?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mightypant5
    Junior Member
    • Nov 2021
    • 1

    #1

    Reset web front end password?

    I somehow have managed to forget my web front end password. I suspect that I accidentally deleted/overwrote the password in my password manager. When I try to log in with the password that I believe it is set to I get an error saying: "Incorrect user name or password or account is temporarily blocked."

    I see in the documentation it says

    2.1 Credentials (login:Password)


    System:
    • appliance:zabbix

    Database:
    • root:<random>
    • zabbix:<random>
    Database passwords are randomly generated during the installation process.
    Root password is stored to /root/.my.cnf file, it is not required to input a password under the “root” account.

    Zabbix frontend:
    • Admin:zabbix

    To change the database user password it has to be changed in the following locations:
    • MySQL;
    • /etc/zabbix/zabbix_server.conf;
    • /etc/zabbix/web/zabbix.conf.php.

    None of the above Login/passwords work. Is the database password the same as the web front end password? I don't want to go through the trouble of resetting that and then further break my zabbix instance if that's not the right one. How do I reset the password?

    thanks!
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    First of all, ask Google!! ;-) "zabbix frontend reset password"
    https://yallalabs.com/linux/zabbix-h...ut-gui-access/
    https://bobcares.com/blog/zabbix-reset-admin-password/
    etc

    Comment

    • markfree
      Senior Member
      • Apr 2019
      • 868

      #3
      Originally posted by Hamardaban
      Both of these posts sugest using:
      Code:
      update users set passwd=md5('YOUR_NEW_PASSWORD') where alias='Admin';
      You should change "alias" with "username" for a more recent Zabbix Server. Like this:
      Code:
      update zabbix.users set passwd=md5('YOUR_NEW_PASSWORD') where username='Admin';
      I guess "alias" was an old name for the "username" column.

      Comment

    • saintsid
      Junior Member
      • Aug 2022
      • 1

      #4
      Yeah, it does not work and not looking good now with md5. How to change password now?

      Click image for larger version

Name:	Screenshot 2022-08-15 101707.png
Views:	34290
Size:	20.7 KB
ID:	449791

      Comment


      • Jonas Lundberg
        Jonas Lundberg commented
        Editing a comment
        If anyone lands on this, the below helped me. I am running v 6.2 and the md5 doesn't work either. The password is now encryped with bcrypt so run it through bcrypt first
        Example (I used a webbased tool but) I think you can with htpasswd from apache run something like htpasswd -bnBC 10 "zabbix" password | tr -d ':\n'
        then in mysql, example:
        update zabbix.users set passwd=('$2y$10$OmrcMNBQ06h1UuaDWxCsKe9/T8qscsdgE9wcgkyafWHYoBw3i') where userid='1';
    • yonisade
      Junior Member
      • Aug 2022
      • 1

      #5
      A workaround is to set "Admin" encrypted password same as "guest" user in MySQL:
      Code:
      UPDATE zabbix.users AS a
      INNER JOIN zabbix.users AS b ON b.username='guest'
      SET a.passwd = b.passwd;
      and then login into the Zabbix Web UI with "Admin" user and without a password and then change the password in the "User Settings"->"Profile" page

      Comment


      • ojosaghae
        ojosaghae commented
        Editing a comment
        Thank you so much!!!
    • BBAMike
      Junior Member
      • Dec 2022
      • 1

      #6
      Originally posted by yonisade
      A workaround is to set "Admin" encrypted password same as "guest" user in MySQL:
      Code:
      UPDATE zabbix.users AS a
      INNER JOIN zabbix.users AS b ON b.username='guest'
      SET a.passwd = b.passwd;
      and then login into the Zabbix Web UI with "Admin" user and without a password and then change the password in the "User Settings"->"Profile" page
      I just want to say that I've registered for this forum for the express purpose of thanking you for posting this workaround.

      Comment


      • vishu
        vishu commented
        Editing a comment
        Hi ,For above post user name and password please
    • zabbitude
      Junior Member
      • Mar 2023
      • 1

      #7
      I just want to say that I've registered too for this forum for the express purpose of thanking you for posting this workaround
      This didn't worked exactly as expected since I've made the choice of Postgresql. So here is the command I used from psql:
      Code:
      postgres=#\c zabbix
      zabbix=# UPDATE users SET passwd=(SELECT passwd FROM users WHERE username='guest') WHERE username='Admin';

      Comment


      • rockandstone
        rockandstone commented
        Editing a comment
        Thank you

      • crsanjeev
        crsanjeev commented
        Editing a comment
        Thank you, zabbitude!!
        I modified the code shared by zabbitute to reset the password to default - zabbix for user Admin.
        The code is as follows:
        postgres=#\c zabbix
        zabbix=# UPDATE users SET passwd=('$2y$10$23CgexOq40If/sG46AYus.U2v82WiDfMrcqYRNoGSf6T7swAdytZS') WHERE username='Admin';
    • mircsicz
      Junior Member
      • Oct 2020
      • 10

      #8
      I'm grateful for that hint but have to disagree with that suggestion! You'll reset every users password!!!

      Originally posted by yonisade
      A workaround is to set "Admin" encrypted password same as "guest" user in MySQL:
      Code:
      UPDATE zabbix.users AS a
      INNER JOIN zabbix.users AS b ON b.username='guest'
      SET a.passwd = b.passwd;
      and then login into the Zabbix Web UI with "Admin" user without a password and then change the password in the "User Settings"->"Profile" page
      I suggest to just update admin's passwd by running this line:​
      Code:
      update zabbix.users set passwd=('$2y$10$zH.KFQELRDLKlExVq18Z.eVty9yLGL7cHM9B9vTuXX1oDTcWvYALK') where userid='1';
      ​
      This will set the passwd to 'foobar' then go ahead login and change the passwd to sth appropriate.

      BTW: I was drawn to this topic after upgrading straight from 5.0.34 to 6.0.17.

      So I googled and found this thread which gave me a first hint. I went ahead and found this on the blog. What I'm really missing here is a hint for a solution like this somewhere in the blog or the changelog...
      Last edited by mircsicz; 27-04-2023, 15:26.

      Comment


      • mcornett6
        mcornett6 commented
        Editing a comment
        Thanks for the help!
    • crsanjeev
      Junior Member
      • Aug 2023
      • 1

      #9
      Originally posted by zabbitude
      I just want to say that I've registered too for this forum for the express purpose of thanking you for posting this workaround
      This didn't worked exactly as expected since I've made the choice of Postgresql. So here is the command I used from psql:
      Code:
      postgres=#\c zabbix
      zabbix=# UPDATE users SET passwd=(SELECT passwd FROM users WHERE username='guest') WHERE username='Admin';
      Thank you, zabbitude!!
      I modified the code shared by zabbitude to reset password for Admin user to default - zabbix ($2y$10$23CgexOq40If/sG46AYus.U2v82WiDfMrcqYRNoGSf6T7swAdytZS - BCRYPT HASH)
      The code is as follows:
      Code:
      postgres=#\c zabbix
      zabbix=# UPDATE users SET passwd=('$2y$10$23CgexOq40If/sG46AYus.U2v82WiDfMrcqYRNoGSf6T7swAdytZS') WHERE username='Admin';​

      Comment

      • BlueH2O
        Junior Member
        • Jul 2023
        • 6

        #10
        None of these methods worked for me; is there another way?

        I have reset the password in the database, and confirmed the hash matches the value I expect. I also reset the attempt_failed and attempt_clock.
        Zabbix still will not accept any login.
        Last edited by BlueH2O; 15-08-2023, 17:53. Reason: Additional info

        Comment

        • hbswzy
          Junior Member
          • Feb 2025
          • 1

          #11
          Originally posted by yonisade
          A workaround is to set "Admin" encrypted password same as "guest" user in MySQL:
          Code:
          UPDATE zabbix.users AS a
          INNER JOIN zabbix.users AS b ON b.username='guest'
          SET a.passwd = b.passwd;
          and then login into the Zabbix Web UI with "Admin" user and without a password and then change the password in the "User Settings"->"Profile" page
          Thank you so much! I'm surprised I had to do so much digging to find this beautiful trick, cheers!

          Comment

          • Dangers
            Junior Member
            • Mar 2025
            • 1

            #12
            Originally posted by yonisade
            A workaround is to set "Admin" encrypted password same as "guest" user in MySQL:
            Code:
            UPDATE zabbix.users AS a
            INNER JOIN zabbix.users AS b ON b.username='guest'
            SET a.passwd = b.passwd;
            and then login into the Zabbix Web UI with "Admin" user and without a password and then change the password in the "User Settings"->"Profile" page
            THANK YOU SO MUCH!!!! You've saved me from a VERY disappointing night after spending hours on this and trying to figure out what's going wrong to no avail until I tried this!! You've made my night, Bless your soul!

            Just like most others I've also made an account on this forum just to thank you haha. I'll likely never login or use it again but thank you so much!

            Comment

            Working...