Page 1 of 1

Can't Login

Posted: Sun Jul 05, 2009 3:35 pm
by nojstevens
Hello,

All was working quite well - added cameras etc. Then I switch authentication on.

Now I cannot login. I tried admin/admin, the system appears to logon for a brief second, then I get returned to the login screen. I read on another thread that I can turn authentication off in webmin. I took a look but I can't see how to do this. Could someone help me?

I am running Centos 5 with Zoneminder 1.23.3

Jon
________
Suzuki Alto Lapin History

Posted: Mon Jul 06, 2009 1:50 am
by kingofkya
a quick search tells you it is admin:admin

Posted: Mon Jul 06, 2009 1:55 am
by nojstevens
Yes, I found that, but when I enter it, it appears to login for a second and then returns to the logon page.

Jon
________
Buy bubblers

Posted: Mon Jul 06, 2009 5:34 am
by kingofkya
can you access the mysql database

Posted: Mon Jul 06, 2009 11:09 am
by nojstevens
Yes, I can access mysql from both ssh and webmin

Jon
________
Subaru Xt History

Posted: Mon Jul 06, 2009 5:35 pm
by 50cc
I had the same, I was curious what would happen if you delete the admin user.... You get no extra warning, it will delete it and that's it.

I used phpmyadmin to restore the admin user, ZoneMinder itself was unusable.

Posted: Mon Jul 06, 2009 5:37 pm
by nojstevens
Hi 50cc, thanks for your input - what exactly did you do - step wise - with phpmyadmin? I'm not familiar with this.

Any help would be much appreciated, I don't want to have to reinstall (again)!

Jon
________
Miyoshi plant (mazda)

Posted: Mon Jul 06, 2009 5:41 pm
by 50cc
http://<yourserver>/phpmyadmin

ZM database -> Users table -> Click on SQL at the top of the page.

Insert:

Code: Select all

INSERT INTO `Users` (`Id`, `Username`, `Password`, `Language`, `Enabled`, `Stream`, `Events`, `Control`, `Monitors`, `Devices`, `System`, `MaxBandwidth`, `MonitorIds`) VALUES 
(1, 0x61646d696e, '*4ACFE3202A5FF5CF467898FC58AAB1D615029441', '', 1, 'View', 'Edit', 'Edit', 'Edit', 'Edit', 'Edit', '', '');
Click Go.

Posted: Mon Jul 06, 2009 5:47 pm
by nojstevens
Great, thanks - will try tonight. Fingers crossed.

Jon
________
Volcano vaporizer

Posted: Tue Jul 07, 2009 1:30 am
by nojstevens
Hi, tried the above but still the same, can't logon.

This was working before i ticked the box to say 'require authorization' in the ZM Options page.

Would you know how to untick this option in a config file or in the mysql tables - that would allow me in again?

Thanks for your help

Jon
________
Vaporizer reviews

Posted: Tue Jul 07, 2009 2:08 am
by nojstevens
I reinstalled and all is ok now.

Thanks for the help

Jon
________
VAPORIZER AFFILIATE PROGRAM

Re: Can't Login

Posted: Fri Feb 17, 2017 2:38 am
by mysterylectricity
This worked for me:

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;
Then enter the following:

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 default login to admin and the password to changepassword

Re: Can't Login

Posted: Wed Feb 13, 2019 12:31 pm
by dad1
Thanks to mysterylectricity for pointing at a solution having just locked myself out by enabling authentication.

As an enhacement to his solution in the post above, if you have an existing admin user then use this SQL command instead of the INSERT:

Code: Select all

UPDATE `Users` set Password = '*3B34B40DAE3DD1E15943B37622F688A6D7F8002D' where `Id` = 1;
You should then be able to log in using:

Username: admin
Password: changepassword