Ad Widget

Collapse

how to reset the Admin password without gui access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrmurdock
    Member
    • Aug 2009
    • 85

    #1

    how to reset the Admin password without gui access

    The title says it all. Its zabbix 1.8. Thank you. I know it must be a database command, but, not familiar enough with mysql to do it.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    In the user table set the password for the admin user to blank. Then you can log in without a password, however you will need/want to change it to something with a password quickly. :-D
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • mattlf
      Junior Member
      • Feb 2010
      • 8

      #3
      Hi

      Our sysadmin left and I have to get into zabbix and try to get access to the super user

      In the user table I set the password for the admin user to blank

      update users set passwd='' where name='Zabbix';

      mysql> select name, alias, passwd from users where name='Zabbix';
      +--------+-------+--------+
      | name | alias | passwd |
      +--------+-------+--------+
      | Zabbix | Admin | |
      +--------+-------+--------+

      I restarted zabbix : ./zabbix_agentd stop; ./zabbix_agentd start

      However, when trying to log in, I get

      ERROR: Login name or password is incorrect

      I would appreciate any help. Is there some logging I can turn on to see what is happening

      Thank you

      Comment

      • mrmurdock
        Member
        • Aug 2009
        • 85

        #4
        Fortunately for me I was just at install so I dropped the database and re-created it from scratch.
        However, Mysqladmin makes sure the password is encrypted. I using RHEL5, with 5.0 of mysql.
        From the linux shell as the root user,

        mysqladmin -u <user> password '<new_password>'
        mysqladmin -u <user> -h <host> password '<new_password>'

        Comment

        • mattlf
          Junior Member
          • Feb 2010
          • 8

          #5
          Thank you for your reply.
          But this would be for the mysql user
          I am actually trying to reset the zabbix admin/super user password
          And this does not work for me

          Comment

          • mrmurdock
            Member
            • Aug 2009
            • 85

            #6
            Go to www.mysql.com and do a search for Mysql 5.0 Manual...
            thats about as much as I can do.

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #7
              update zabbix.users set passwd=md5('mynewpassword') where alias='Admin';
              Zabbix 3.0 Network Monitoring book

              Comment

              • mattlf
                Junior Member
                • Feb 2010
                • 8

                #8
                cool. it works. Thanks a lot
                I had to restart the web server as well

                Comment

                • chocho63
                  Member
                  • Jun 2005
                  • 53

                  #9
                  Help password

                  I've just upgraded to 1.8.1 from 1.1.
                  Can't connect... This SQL statement works, but I still can't connect...

                  Comment

                  • aic
                    Member
                    • Oct 2010
                    • 50

                    #10
                    Hi All,

                    Please help I will need to do the same for Oracle environment....

                    Thanks!

                    Comment

                    • nelsonab
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Sep 2006
                      • 1233

                      #11
                      aic, have you tried any of the above?
                      RHCE, author of zbxapi
                      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
                      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

                      Comment

                      • walterheck
                        Senior Member
                        • Jul 2009
                        • 153

                        #12
                        on a sidenote: shouldn't the password be salted in the database?
                        Free and Open Source Zabbix Templates Repository | Hosted Zabbix @ Tribily (http://tribily.com)

                        Comment

                        • aic
                          Member
                          • Oct 2010
                          • 50

                          #13
                          Hi nelsonab,

                          Actually, I didn't tried the options suggested above because I am using Oracle Database instead of MySQL.

                          I fixed this issue applying the default hash (password) for Admin user.

                          Anyway, thanks for your reply!

                          Have a good week.

                          Comment

                          • zhanghui8059
                            Junior Member
                            • May 2011
                            • 6

                            #14
                            Originally posted by aic
                            Hi nelsonab,

                            Actually, I didn't tried the options suggested above because I am using Oracle Database instead of MySQL.

                            I fixed this issue applying the default hash (password) for Admin user.

                            Anyway, thanks for your reply!

                            Have a good week.
                            Hi,
                            I use oracle database,and use update users set passwd=hash(password) where name='zabbix';
                            but oracle error is not hash,pls help,how are you doing?THKS!

                            Comment

                            • igalsc
                              Junior Member
                              • Jan 2021
                              • 20

                              #15
                              Originally posted by richlv
                              update zabbix.users set passwd=md5('mynewpassword') where alias='Admin';
                              Thank you, this worked for me with Zabbix 5.2

                              Comment

                              Working...