admin account deleted

Support and queries relating to all previous versions of ZoneMinder
Post Reply
cisco
Posts: 2
Joined: Sat Jul 09, 2011 9:59 am

admin account deleted

Post by cisco » Sat Jul 09, 2011 10:03 am

I have deleted admin account from zoneminder and now I cannot log in.
How can this be fixed?

I have tryed to add new user to mysql database but it seems not working.
I am also new to sql and some help would be appreciated.

cisco
Posts: 2
Joined: Sat Jul 09, 2011 9:59 am

Re: admin account deleted

Post by cisco » Sat Jul 09, 2011 10:09 am

its ok now used this command to create admin user with pass: changepassword

Code:
INSERT INTO `Users` (`Id`, `Username`, `Password`, `Language`, `Enabled`, `Stream`, `Events`, `Control`, `Monitors`, `Devices`, `System`, `MaxBandwidth`, `MonitorIds`) VALUES
(1, 'admin', '*3B34B40DAE3DD1E15943B37622F688A6D7F8002D', 'en_gb', 1, 'View', 'Edit', 'Edit', 'Edit', 'Edit', 'Edit', '', '');

mysterylectricity
Posts: 15
Joined: Sat Jan 07, 2017 2:09 am

Re: admin account deleted

Post by mysterylectricity » Fri Feb 17, 2017 2:31 am

This worked for me as well. For those of you who are not familiar with using mysql, the following commands are prerequisite:

Code: Select all

mysql -u root -p
Enter password:
If you have not set an explicit password for mysql, the system root password worked for me.

Then select the zm database:

Code: Select all

use zm;
And then:

Code: Select all

INSERT INTO `Users` (`Id`, `Username`, `Password`, `Language`, `Enabled`, `Stream`, `Events`, `Control`, `Monitors`, `Devices`, `System`, `MaxBandwidth`, `MonitorIds`) VALUES
(1, 'admin', '*3B34B40DAE3DD1E15943B37622F688A6D7F8002D', 'en_gb', 1, 'View', 'Edit', 'Edit', 'Edit', 'Edit', 'Edit', '', '');
This will set the deafult login to admin and the default password to changepassword.

The changes take effect immediately. Change your password and add another privileged user in case you make thew same mistake again.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests