Can't Login

Support and queries relating to all previous versions of ZoneMinder
Locked
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Can't Login

Post 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
Last edited by nojstevens on Sat Feb 12, 2011 6:29 am, edited 1 time in total.
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

a quick search tells you it is admin:admin
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Post 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
Last edited by nojstevens on Sat Feb 12, 2011 6:29 am, edited 1 time in total.
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

can you access the mysql database
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Post by nojstevens »

Yes, I can access mysql from both ssh and webmin

Jon
________
Subaru Xt History
Last edited by nojstevens on Sat Feb 12, 2011 6:29 am, edited 1 time in total.
50cc
Posts: 82
Joined: Sun Mar 23, 2008 12:01 pm
Location: The Netherlands

Post 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.
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Post 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)
Last edited by nojstevens on Sat Feb 12, 2011 6:29 am, edited 1 time in total.
50cc
Posts: 82
Joined: Sun Mar 23, 2008 12:01 pm
Location: The Netherlands

Post 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.
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Post by nojstevens »

Great, thanks - will try tonight. Fingers crossed.

Jon
________
Volcano vaporizer
Last edited by nojstevens on Sat Feb 12, 2011 6:30 am, edited 1 time in total.
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Post 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
Last edited by nojstevens on Sat Feb 12, 2011 6:30 am, edited 1 time in total.
nojstevens
Posts: 22
Joined: Sat Jul 04, 2009 4:53 pm

Post by nojstevens »

I reinstalled and all is ok now.

Thanks for the help

Jon
________
VAPORIZER AFFILIATE PROGRAM
mysterylectricity
Posts: 21
Joined: Sat Jan 07, 2017 2:09 am

Re: Can't Login

Post 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
dad1
Posts: 12
Joined: Fri Feb 04, 2011 10:18 am

Re: Can't Login

Post 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
Locked