Commit Graph
60 Commits
Author SHA1 Message Date
singhharsh1708 d93e2e0e01 docs: point to the authentication tab, not the system tab, for turning on auth 2026-11-16 03:09:32 +05:30
Isaac ConnorandClaude Opus 5.5 9e3885e8fd refactor: remove ZM_OPT_FAST_DELETE
With fast deletes on, deleting an event in the web interface removed only
its Events row and left its Frames and Stats rows and its files for
zmaudit, and deleting a monitor left all of its events. zmaudit only runs
when ZM_RUN_AUDIT is on, and both options default to off independently,
so with fast deletes on and the audit off nothing ever removed them and
the Frames table grew without bound. In the Perl Event::delete the option
also kept zmfilter from removing the files of the events it purged.

Remove the option. ZM\Event::delete() always removes the Stats and Frames
rows and the files in one transaction with the Events row,
ZM\Monitor::destroy() always deletes the monitor's events, and the Perl
Event::delete deletes the files unless the storage area has DoDelete off.
zmupdate.pl rebuilds the Config table from ConfigData, so the option's row
goes away on upgrade without a migration. Drop the option from the docs,
from the zmaudit option help, and from the es_la, ro_ro and ru_ru
translations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:50:01 -05:00
Nic Boet ebbe1e59e2 feat: ask on the first page whether to require a login refs #5287
A new install starts with authentication on and the admin password admin,
which is refused everywhere. Asking for that password just to replace it is
an extra step, and some installs don't want a login at all. Ask instead.

While the first run is pending (authentication on, the privacy page not
answered yet, builtin auth, and admin still has the password admin), the
login page shows "Set up ZoneMinder" instead of the login form:

- Require a login: choose the admin password; the account is then logged
  in and the privacy page follows, as before.
- Don't require a login: ZM_OPT_USE_AUTH is set to 0 in the database.
  Not offered when ZM_OPT_USE_AUTH is set in zm.conf or conf.d: the owner
  of the box has decided then, and only the password is asked for.

Until one is chosen the web interface, API and streams can't be used: the
password admin is still refused. Whoever opens the page first makes the
choice; before this, whoever typed admin/admin did. The form carries a
nonce kept in the session, like the default-password form, and is exempt
from csrf-magic as action=login is (the login regenerates the session id).
Both choices are audited. Upgrades are not affected: ZM_SHOW_PRIVACY is 0
once the privacy page was answered, and zmupdate.pl doesn't reset it.

Docs: a First Run section in the getting-started guide, and the FAQ and
system options updated to match.

Tests: tests/php/test_first_run.php.
2026-10-16 10:10:25 -05:00
Nic Boet cb4c5f5314 feat: ask for a new password when an account logs in with the default one refs #5287
db/zm_create.sql seeds the admin account with the password the user
guide documents (admin), so with authentication on a new install is
still open to anyone who reads the guide.

Refuse that password as a credential and have the web login replace it:

- validateUser() returns false with "This account uses the password
  admin, which ZoneMinder does not accept. Log in to the web interface
  to set a new one." when the password is right but is admin. The API (login.json and
  user=/pass= on any request) answers 401 with that message; the
  user=/pass= web parameters are refused the same way.
- On the login page (action=login) the same login shows a form that
  asks for the current password again and a new one, with a nonce kept
  in the session so another site can't submit it for the user. The new
  password must be set, confirmed and not the default. The account is
  logged in only once it has been replaced; the change is audited.
  That POST skips reCAPTCHA when it carries the form's nonce: the form
  follows a login that passed it, and doesn't render the widget.
  With ZM_AUTH_RELAY=plain the session keeps the new password.
- zmLoadUser() refuses the default password, so zms, zmu and the RTSP
  server don't accept it in user/password parameters either.

The check is on the password typed, so it needs no schema change, covers
existing installs whose admin still has the default password, and
follows the account if it is renamed. A password set to the default
again later is caught the same way. Sessions, tokens and auth hashes
issued before the upgrade keep working until they expire; with
ZM_AUTH_TYPE=remote the web server's login is not affected.

The FAQ now says to force authentication on in conf.d: since 4d7609d36
the daemons apply zm.conf and conf.d values over the database too.

Tests: tests/php/test_default_password.php (the helpers, and that the
seeded hash is the documented default), tests/zm_user_default_password.cpp.
2026-10-16 10:10:25 -05:00
Nic Boet 9ee0e91819 feat: turn authentication on by default for new installs refs #5287
ZM_OPT_USE_AUTH shipped as 0, so a new install accepted every request as
the default user with System=Edit. That includes requests a browser sends
on behalf of any web page a user on the same network opens, so a server
that is never exposed to the internet could still be driven from it.

Default it to 1. zm_create.sql (generated from ConfigData) gives new
installs authentication on. Existing installs keep their value:
zmupdate.pl -f loads Value from the database and writes it back, and only
DefaultValue changes. zm_update-1.39.41.sql also sets DefaultValue to 1
for the row, so that an upgrade run without -f doesn't leave
Value = DefaultValue = 0, which the C++ config loader would skip in favour
of its compiled-in default (on) while the web UI read off.

Update the option help and the user guide (getting started, FAQ, system
options) to say authentication is on for new installs and kept on
upgrade. tests/perl/test_auth_default.pl checks the default, the stored
value and that no update script sets the row's Value; tests/zm_config.cpp
now expects the compiled-in default (opt_use_auth) to be on.
2026-10-16 09:40:37 -05:00
robertsilen 1b526e1053 add mariadb 2024-08-19 12:57:40 +03:00
Alejandro Criado-Pérez 6fd119157a Text corrections 2023-08-27 02:00:59 +02:00
Alejandro Criado-Pérez a5d83e61b4 Corrections on rst files 2023-08-13 01:20:29 +02:00
Håvard Flaget Aasen f2281d1017 Typos in documentation
This is typos noticed by lintian.
2021-10-17 13:29:00 +02:00
Isaac Connor f0abcdf585 Merge branch 'release-1.34' into update_docs_1_34 2021-05-10 14:48:50 -04:00
Esteban Flores c4eb59442e Changed "Purge By Age" filter
Changed "Purge By Age" filter, the "date" option is not available in v1.34.22. Using "End Date" as the filter parameter works just fine.
2020-11-05 12:27:46 -05:00
Pliable Pixels 40da485994 I vote to remove this backtrace FAQ on addr2line - it never seems to be useful 2019-10-27 17:34:55 -04:00
Pliable Pixels ed9ed8da0c nits 2019-10-27 17:34:10 -04:00
Pliable Pixels a61b456b1c more fixes, also note that zmN may have issues with web server auth 2019-10-27 17:33:01 -04:00
Pliable Pixels 6ee902e0bf more fixes 2019-10-27 17:29:15 -04:00
Pliable Pixels 19f0c1cf87 fix discussion on ZM logs, link to logs doc 2019-10-27 17:23:12 -04:00
Pliable Pixels bf7e230ca7 replace old code for custom actions on alarm with link to zmalarm 2019-10-27 17:18:58 -04:00
Pliable Pixels 7fe6ef6193 remove note on mapped memory disabling. No one disables it. 2019-10-27 17:14:58 -04:00
Pliable Pixels 5ae5257277 add note to refer to forums in the FAQ 2019-10-27 17:14:21 -04:00
Pliable Pixels 1546079977 message 2019-10-27 17:05:50 -04:00
Pliable Pixels 574e8f4367 more formatting, plus the "Building ZM" section is outdated 2019-10-27 17:04:53 -04:00
Pliable Pixels 97ef06bbe8 take out DEEP_STORAGE - its no longer there 2019-10-27 16:57:06 -04:00
Pliable Pixels fc5c391232 fix size calculator online sheet (don't know if its still correct) 2019-10-27 16:56:20 -04:00
Pliable Pixels 48d2c4e483 Options->Path->ZMS is invalid and also add Q for 6 connections 2019-10-27 16:53:39 -04:00
Pliable Pixels 8801b1376c remove shmmax/etc Q. No longer needed. 2019-10-27 16:45:14 -04:00
Pliable Pixels 4f2cacbf3d put a warning that fast delete/audit are generally no longer recommended 2019-10-27 16:43:27 -04:00
Pliable Pixels f2dd2b3723 3 for slow delete seems arbitrary and way too less 2019-10-27 16:41:14 -04:00
Pliable Pixels 0044944b6c refer to FIFO along with diag 2019-10-27 16:39:55 -04:00
Pliable Pixels b3943e0c49 consistent naming of ES -> Event Notification Server 2019-10-27 10:47:09 -04:00
Pliable Pixels 920fd5be1e link to zmN/ES faQ in ZM faq 2019-10-26 10:15:15 -04:00
Pliable Pixels 6374badea6 faq to be reviewed 2019-10-25 14:40:28 -04:00
Isaac Connor b6c22139d6 update links in docs. Remove build examples using configure as it has been deprecated for a long time. 2019-10-18 18:16:59 -04:00
Tsaukpaetra c5d2aab80a Update faq.rst (#2680)
Add new entry for timezone-related issue
2019-08-08 08:47:23 -04:00
Isaac Connor 5a561b2558 Some doc updates to matches changes in UI. 2019-07-19 16:39:18 -04:00
Isaac Connor 45a9f9158d spelling mistakes 2018-11-29 10:45:30 -05:00
Isaac Connor 5ebfae5f14 fix warnings in building docs by using anonymous links (double underscore at the end) 2018-04-30 09:51:26 -04:00
Isaac Connor 0077f2e17b Update faq.rst
I see no reason to mention bits. No one cares about bits. Our base unit should be bytes.  Also, lets be consistent and use 1024 as the divisor when converting to Kb and Mb and Gb.
2018-02-28 11:06:28 -05:00
jethornton 431ec3ea75 Update faq.rst (#1970)
The memory math is confusing and incorrect. Original posted added a 5th camera but did not update the final memory size or explain how they arrived at that value.
2017-08-21 11:25:44 -04:00
SteveGilvarry 2f3ebd80da Remove zmf, die..die..die 2017-01-16 13:20:05 -08:00
Isaac Connor 38c31be720 typo fix pluging -> plugin 2016-12-19 22:02:44 -05:00
Isaac Connor 4e89298183 fix another typo and stop recommending that people use ZM_OPT_FAST_DELETE 2016-12-19 22:01:45 -05:00
Isaac Connor 8b726996f7 FAQ fixes, more text about zms problems in it, and adjust the socket_sendto error message to point to the FAQ entry that is relevant. 2016-12-19 21:36:39 -05:00
Ian 749a90f199 Add additional details to increasing mapped memory.
Other distro’s do not use /run/shm as the memory mapped path, so added
information to cover this case.

Also filtered the output of df to focus our attention on the only mount
points that matter here.
2016-11-03 22:43:07 -07:00
Dmitry Smirnov f1acc52913 spellcheck/codespell 2016-07-14 00:30:39 +10:00
Pliable Pixels 859a55e1ef updated documentation to include runstates 2016-04-13 12:54:22 -04:00
Dmitry Smirnov 5bcc414038 codespell: misc. spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2016-02-08 20:41:36 +11:00
PliablePixels 2ea8d68fa7 content updated 2015-08-14 11:53:23 -04:00
PliablePixels 69c7e0f556 content updated 2015-08-14 11:19:16 -04:00
PliablePixels 38caa4df3c content updated 2015-08-14 10:28:28 -04:00
PliablePixels 10d8d4ea93 content updates 2015-08-14 09:29:09 -04:00