Page 1 of 1
How to reset password?
Posted: Tue Dec 03, 2019 12:51 am
by nixcamic
I updated my system and Zoneminder wouldn't let me log in, so I tried blanking the admin password from phpmyadmin as everyone on the internet says to do, but I still can't log in, since Zoneminder won't let you log in with a blank password anymore (I get "please fill out this field" on the password field). I tried using the mysql password function to generate a new password (as also seen on the internet), and that didn't work since it's been deprecated. Then I dug into the source code using my very limited knowledge of PHP and found that it was using the password_hash function. I tried generating a new password with password_hash using phpmyadmin to set the password to that and it also wouldn't work. Also, also, I tried just disabling auth then changing the password, but you can't change passwords with auth disabled? I'm at my wits end here, how do I get my password set?
Also: tried using web inspector to make it let me use a blank password, also didn't work. I can attempt login but it won't accept my blank password as correct.
Re: How to reset password?
Posted: Tue Dec 03, 2019 1:08 am
by nixcamic
Also, the password hash before I blanked it was "*4ACFE3202A5FF5CF467898FC58AAB1D615029441" which from some googling is the hash for "admin" which is what the password was. It's also a very old mysql PASSWORD function hash, which is why it probably wasn't working post-upgrade. I still need a way of setting the password to something usable though.
Re: How to reset password?
Posted: Tue Dec 03, 2019 1:37 am
by nixcamic
So.. this mostly seems to be a problem after upgrading from mysql 5.7 to mysql 8 (since ubuntu 19.10 doesn't have a 5.7 package). Is there any known way to get login working after upgrading to mysql 8?
Re: How to reset password?
Posted: Tue Dec 03, 2019 3:12 pm
by nixcamic
So in the end it had nothing to do with passwords really, I dumped the DB and switched over to MariaDB instead of mysql 8 and now it's working.
Re: How to reset password?
Posted: Tue Dec 03, 2019 5:34 pm
by snake
For those searching, I put instructions for resetting the password here:
https://wiki.zoneminder.com/MySQL#Troubleshooting
Re: How to reset password?
Posted: Thu Dec 05, 2019 7:55 am
by nixcamic
Thanks, although I'd point out that in my case, it wasn't even that I'd forgotten the password, but that if you upgrade past mysql 8.0.11 I'm not sure if you can log in at all, or how to actually get a functional password. Even blanking it didn't seem to work. MariaDB works fine, even the latest version though.