Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a way to reset the admin password for the surveillance application zoneminder without re-installing the application? I was not able to find this information in the documentation or by googling it.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Try looking at the /etc/apache2/conf.d/zoneminder.conf I doubt the password is in there in plain-text but worth a shot.

After a quick look it does use a sql backend and likely the users/passwords are in there. Since the install states to use a different password for sql you could try getting in there though the passwords (Hopefully) are encrypted. You can use something like http://packages.ubuntu.com/hardy/mysql-query-browser to see the database tables/rows

share|improve this answer
    
This indeed is worth a shot. I will check this out as soon as I get home. Thanks. –  user787913 Mar 7 '12 at 19:07
    
The passwords were encrypted, but I was able to replace the admin pass with one from another user, problem solved. Thanks! –  user787913 Mar 8 '12 at 3:54
    
No problem, alot of local app databases do this stuff so its pretty common. –  Meddy Mar 8 '12 at 4:08

1) login to mysql, for example, "root" user in MySQL server:

$ mysql -u root -p
Enter password:

2) put your password then enter, outcome is:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6485
Server version: 5.5.29-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>

3) write: show databases;

Outcome is:

+--------------------+
| Database           |
+--------------------+

| information_schema |

| mysql              |

| performance_schema |

| test               |

| zm                 |
+--------------------+

5 rows in set (0.00 sec)"

4) Here are all your databases, say "zm" is the one you are looking for.

write: use zm;

output is:

   Reading table information for completion of table and column names
   You can turn off this feature to get a quicker startup with -A
   Database changed

5) You need to change the password of your user so if you want to check user and other sections of the table "Users" in the "zm"database.

Write: select * from Users;

Outcome is:

+----+----------+-------------------------------------------+----------+---------+--------+--------+---------+----------+---------+--------+--------------+------------+
| Id | Username | Password                                  | Language | Enabled | Stream | Events | Control | Monitors | Devices | System | MaxBandwidth | MonitorIds |
+----+----------+-------------------------------------------+----------+---------+--------+--------+---------+----------+---------+--------+--------------+------------+

|  1 | admin    |  yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy |          |       1 | View   | Edit   | Edit    | Edit     | Edit    | Edit   |              |            |
|  2 | admin2    | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |          |       1 | View   | Edit   | Edit    | Edit     | None    | Edit   |              | 1          |
+----+----------+-------------------------------------------+----------+---------+--------+--------+---------+----------+---------+--------+--------------+------------+

2 rows in set (0.00 sec)"

6) Then lets say you want to change the password of "admin" user and put it blank, write:

mysql> update Users set Password="" where Username="admin";

Outcome is:

   mysql> update Users set Password="" where Username="admin";
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    mysql>

Please note that all those "y" and "x" are replacing the hash from my passwords in my zm configuration. So if you chose hashed, plain or none in the options menu from zm web page:

"AUTH_RELAY Method used to relay authentication information (?) hashed plain none"

In MySQL you will see the password accordingly, say you'll find a hash, or your password in plain text or an empty space if there was no password at all. I hope this help you. I'm using Zoneminder 1.25 in a Ubuntu server 12.04.

share|improve this answer
  1. login to mysql, navigate to your Zoneminder db.
  2. mysql> update Users set Password="" where Username="admin";
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.