Deleted passwords... TWICE!

Support and queries relating to all previous versions of ZoneMinder
Locked
Sergio
Posts: 10
Joined: Mon Aug 03, 2009 6:04 pm

Deleted passwords... TWICE!

Post by Sergio »

Ok, so I messed things up. It should be an easy fix, if I knew what button to push!

Mistake #1:
I had login names for my system and I decided to remove them. So I went to the "Options" tab and selected "users" and deleted both users. However the login window still appeared but I didn't have any users to log in with!

Mistake #2:
I researched a fix and this was the closest thing: http://www.zoneminder.com/forums/viewtopic.php?p=56098. So I opened PHPMyAdmin and saw that the user ZM was still there with a hashed PW. So I changed that to "ABC". Now the login window does not even appear. Instead I get this:
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'zm'@'localhost' (using password: YES) in /var/www/includes/database.php on line 32
Could not connect to database: Access denied for user 'zm'@'localhost' (using password: YES)

I've made a few mistakes, but it seems fixable. Does anyone know how or should I just reinstall?
Sergio
Posts: 10
Joined: Mon Aug 03, 2009 6:04 pm

Post by Sergio »

Any takers? Ideas, opinions? Otherwise I would need to format.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The last ZM user password you changed was the mysql user for the data base. Hopefully you wrote down the hashed PW so you can put it back, else you will need to cat the zm.conf file and see what PW you need to put in there.

As for your zm users in the zm.users table, you can create one through phpmyadmin and set the PW as hashed or from the command line:

Code: Select all

mysql ZM
insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit','Edit',NULL)
exit
You should now be able to login with admin/admin
Locked