Page 1 of 1

eventnotification: The password for admin has not been migrated in ZM

Posted: Mon May 03, 2021 4:27 pm
by SkippyDo
Recently updated zmeventnotification and am now seeing these errors (everything seems to be working fine):
PARENT: The password for admin has not been migrated in ZM. Please log into ZM with this username to migrate before using it with the ES. If that doesn't work, please configure a new user for the ES
Being thrown from zmeventnotification.pl.

Only relevant diff in zmeventnotification.ini is that debug level is now set to 4, whereas my old copy was set to 2.

In secrets.ini I have (and have never changed it):
ES_ADMIN_INTERFACE_PASSWORD=your_admin_interface_password

There isn't any documentation on that variable/setting. Which "admin?" There's DB admin and then there's ZM admin. I also have a generic ZM user for, I suppose, back end DB access. NONE of this has been changed.

Re: eventnotification: The password for admin has not been migrated in ZM

Posted: Mon May 03, 2021 5:08 pm
by asker
ZM user.

1. Open up a mysql shell with the ZM db (usually mysql -u root zm or something similar)
2. Run the following command

Code: Select all

MariaDB [zm]> select * from Users where Username="admin";
I see:

Code: Select all

+----+----------+--------------------------------------------------------------+----------+---------+--------+--------+---------+----------+--------+---------+--------+--------------+------------+----------------+------------+
| Id | Username | Password                                                     | Language | Enabled | Stream | Events | Control | Monitors | Groups | Devices | System | MaxBandwidth | MonitorIds | TokenMinExpiry | APIEnabled |
+----+----------+--------------------------------------------------------------+----------+---------+--------+--------+---------+----------+--------+---------+--------+--------------+------------+----------------+------------+
|  1 | admin    |  $2y$and_lots_of_characters                                  |          |       1 | View   | Edit   | Edit    | Edit     | Edit   | Edit    | Edit   |              |            |              0 |          1 |
+----+----------+--------------------------------------------------------------+----------+---------+--------+--------+---------+----------+--------+---------+--------+--------------+------------+----------------+------------+
1 row in set (0.001 sec)
What do you see?
If you see the Password column starting with "--ZM--" then you have a user (admin) who is using the old sql functions to create a password and not bcrypt. You need to login to ZM web with that user. Then do the command above again, if "--ZM--" is gone, then good, ES will work as well.

Re: eventnotification: The password for admin has not been migrated in ZM

Posted: Mon May 03, 2021 8:46 pm
by SkippyDo
Database shows "admin" and the password entry starts with "-ZM-" (followed by a string of characters): only account showing "-ZM-". I regularly log in with this user (and have done so many times since the upgrade). Logging in as "admin" under the ZM web interface isn't making any change.

From my Debian system prompt 'man -k bcrypt' returns:
Crypt::Eksblowfish::Bcrypt (3pm) - Blowfish-based Unix crypt() password hash

Re: eventnotification: The password for admin has not been migrated in ZM

Posted: Tue May 04, 2021 11:21 am
by asker
That should mean that ZM is converting the password to bcrypt every time you log in, but is not able to write that value to the DB.
Don't know why. You may want to check ZM logs during login to get clues.

As far as ES goes, create another user anew. It should be created with a proper bcrypt encrypted password and use that. Later, you may want to change the admin password. My guess is even retyping the admin password and hitting save in ZM should fix the problem. However, please make sure you know how to get into the DB and disable auth if something goes wrong.

Re: eventnotification: The password for admin has not been migrated in ZM

Posted: Tue May 04, 2021 4:28 pm
by SkippyDo
I reset the "admin" password from ZM (web) and that took care of the error. Just strange stuff...