Ad Widget

Collapse

Recreate Guest User

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twhitney11
    Junior Member
    • Apr 2021
    • 2

    #1

    Recreate Guest User

    We had an Administrator who didn't know he could add the Guest user to the "Disabled" group so he went into the MySQL database and deleted the user with the "guest" alias from the DB directly. We're using Zabbix 5.0.5. We now wish to use the Guest user for Guest access, is there any way to recreate this user? When we create the user and set the alias as "guest" it seems to be know as the guest user based on the "ZBX_GUEST_USER" global in the codebase, but login as Guest user fails.

    Should the "passwd" field just be empty? Or a hash of an empty string? Should the "type" be 1 to correspond with the standard "USER_TYPE_ZABBIX_USER" global or one of the other two options? It'd be great if someone could check their "users" database to let me know what their Guest user looks like. Sigh, I'll make sure this doesn't happen again... direct database modifications is a no no.

    Thanks for any insight anybody can provide.

    Tyler
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Code:
    MariaDB [my_db]> select name,surname,passwd,autologin,type from users where alias='guest';
    +---------+---------+--------------------------------------------------------------+-----------+------+
    | name | surname | passwd | autologin | type |
    +---------+---------+--------------------------------------------------------------+-----------+------+
    | Default | User | $2y$10$89otZrRNmde97rIyzclecuk6LwKAsHN0BcvoOKGjbT. BwMBfm7G06 | 0 | 1 |
    +---------+---------+--------------------------------------------------------------+-----------+------+

    Comment

    • twhitney11
      Junior Member
      • Apr 2021
      • 2

      #3
      You're a beautiful person, thank you so much! It worked like a charm. I suspect my issue was in the password. I tried it both blank and then did a Bcrypt hashed empty string. Regardless, my Guest user is back to the way it should be. We are working on creating a public "status" dashboard and will be using the Guest use for this purpose.

      Thanks again!

      Tyler

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        Glad to help. ;-) Just FYI, some details were explained here:

        Comment

        Working...