Netavis Observer is a software product for organizing video surveillance using IP cameras based on a Linux server.
Netavis Observer is written in Java, products like Apache Tomcat, Webmin, Munin, Mysql are also used.
There are two options for Netavis Observer - Bundled (supplied as an installation iso-image based on Centos5 or Centos6) and Unbundled - a set of rpm-packages for self-installation on a server running Centos or RedHat.
basic functionality and features:- Support for popular IP cameras and video servers, such as AXIS, ArecontVision, D-link, ACTi, Sanyo, Samsung and others (you can see the full list on the Netavis website).
- Support separation of camera access rights, viewing the archive, video export, PTZ control (PTZ control) with the ability to create groups and users for a specific situation (only viewing online video, viewing online video and archive, but without the right to export video from archive, etc.)
- Availability of the client under Windows, IPhone / iPad.
- Ability to work via a browser (JAVA installation required).
- Ability to create a cluster to work with a large number of cameras.
- Active Directory support (as amended by Enterprise).
- Support Video Analysis (iCAT - motion detection with variations, sabotage detection, remote object detection, privacy mask).
- Adjust the quality of displaying video online and when recording to the archive.
- Customize the location of cameras and the formation of custom sets with the ability to copy these sets to other users.
- Ability to limit bandwidth for cameras and clients when viewing live video and archive.
- Exporting the archive to AVI or SAFE (a .EXE executable file is created with a primitive player and the actual video, you can export the right number of cameras at once in one period of time, one EXE file will be created).
- The ability to run the graphical shell directly on the server - the LXDE session is started, after which the Netavis client is launched.
Now proceed to install
We follow the link and download the Bundled version of the Netavis Observer in the form of iso, write it to the disc and insert it into the server's CD-ROM drive.
Immediately after loading, we see a welcome screen with options for further actions, and there are not very many of them:

-
install options where
options :
-
no options - standard installation on one hard disk. All data from the hard disk will be deleted.
-
hwraid - installation on iron RAID.
-
nus β installation of the event server and without archive.
-
part - installation with the possibility of manual partitioning of disks.
-
nlis β install without archive storage on local disks. Archive storages are mounted via NFS or SAMBA.
-
repair - system recovery after a failure.
Our choice is boot: install. Next is the standard installation procedure for Centos5. After the installation is complete, we agree to reboot. After loading the operating system, we see an invitation to enter the login
admin to complete the installation of the system.

After that, press Enter, and then
0 to confirm the completion of the installation. We agree with the terms of the license agreement by entering
yes .
')
Next, enter the password for the admin user:

Next on the list:- Choose which file system the hard drives will be formatted for storing archives (by default, this is xfs).
- Enter the server name.
- Save the parameters by entering
Save .
- Enter the name of the configuration (I left the default value - Default configuration).
- Choose whether to use DHCP to configure the network or set the parameters statically.
- Enter the IP address, network mask, gateway IP address, DNS server IP address (only if the static network setting is selected).
- Enter the IP address of the mail server (to send system events to the mail).
- Enter the domain name.
- Save the parameters by entering
Save .
- Choose whether the server is also a time server.

- Determine servers for time synchronization and save the parameters by entering
Save.- Enter the email address of the administrator.
- Enter the credentials of the so-called. Customer-user (name, address, organization name).
- We decide whether to launch the client to view the video and archive on the server (by default, do not start).
At this point, the installation is complete and you can reboot by first memorizing or writing down the address of the administrator and client interface:
-
192.168.0.5 : 8000 - administrator interface - a strongly truncated version of WEBMIN (for login, we use the login
admin and the password specified at the beginning of the installation).

-
192.168.0.5 - the Netavis Observer client interface (for logging we use the login
admin and the password specified at the beginning of the installation).
Launch the browser (tested in recent Firefox and Chrome, as well as in IE7) and enter the client's Netavis Observer address - in this case
192.168.0.5Important! - client operation requires installed Java and its support must be activated in the browser settings.
Accordingly, when entering the Netavis interface, this page will first appear:

and if everything is fine with Java, you can select the interface language and click
Start
In the next screenshot, everything is clear - you can start the client from the browser, install the client on the local computer running Windows, as well as on smartphones under iOS (did not test this feature), also view the documentation or go to the Customizer interface under the
admin username and password
admin.
But let's go back and launch (or install locally) the Netavis Observer client. And the first thing we see is the window in which it is proposed to license the program - and there are four points in it:
- Run without license - cut functionality, even the camera is not added.
- Run with a demo license - you can add a camera, but from time to time it will be thrown out of the program.
- Request a license depending on the number of cameras, users and other buns from the official site.
- Directly enter the license key.

We are interested in the last item, as the license key is available. Enter the key, click OK and under the key input fields a message appears that the key is stored on the server. Close the licensing window and start the client again.
After launch, an authorization window appears - login and password according to the documentation:
admin /
adminand finally, the Netavis Observer client interface:

At some point, it turned out that the hard drives installed in the server are not enough to permanently record the archive for each camera for 1 month.
Hard disks of the required capacity were purchased and after reading the documentation, the process of adding and replacing hard disks into the system was clarified. For this, it is not enough to have access to the client interface, access to the system management console is necessary - according to the documentation, you need to log in via SSH to the server as
admin and installed for him a password.
This can be done with the
ssh -l admin 192.168.0.5 command and enter the password. You can also login to the console locally.

According to the documentation, the procedure for adding is as simple as three rubles - we turn off the server, connect a clean, unformatted hard disk, turn on the server and log in to the system.
Next, we type 27 to check on whether the hard disk has been determined or not, then we dial 23 and wait until the end of the file system creation process, the creation of a mount point, etc.
After restarting the server and launching the system, the new hard disk is visible in the system and is ready to write an archive to it.
And in case one of the hard drives fails and needs to be replaced, we follow a different procedure: turn off the server, change the failed hard drive to a working one, turn on the server and log in to the console. We first look at the status of the hard drives, and then type 24 -
Configure replaced disk and wait for the end of the procedure.
Important: The new hard disk must be unformatted, and it must be connected to the same place as the defective hard disk.
We are looking for a problem - and we find it.
Once it was necessary to add two hard disks and remove one small capacity. And since the server was already in near operational use, I wanted to combine the two procedures - adding a hard disk and replacing one hard disk with another.
After booting the system and logging in to the console, I decided to start with the procedure of adding a hard disk instead of replacing one hard disk with another. The system added two new hard disks to the system, and there was nothing to change the hard disk.
The result of such hasty actions was the error displayed in the client's interface next to the processor load β Degraded recording, and the erroneous value of the space available to the system just as much as there were gigabytes on the replaced hard disk. At the same time, in the console this hard disk was displayed as unused - point 25 - Show unusable disks.
No actions in the management console, rollback to the previous configuration and attempts to restore the system from the installation disk to success did not lead. Documentation on this account advised to rearrange the system from scratch or contact the dealer.
Solution to the problem
It was decided to create a similar problem on a virtual machine. It is easily managed.
It was impossible to enter the console under the root - the password is not known. Boot from the live-cd Xubuntu on this virtual machine and start exploring the insides of the system.
The system found the following interesting sections:
- / - proper root partition.
- / netavis - the section where the Netavis system is actually located
- / var / lib / mysql - the partition where the database directory is located.
There are also sections Images1, Images3, Images4 which are mounted in / Images
First we look at the / etc / shadow file for a list of users and their passwords.
We are interested in the following users:
root: $ 1 $ UEe5kAv4 $ nWyqBmcmg3P.kM / ZB / s / 2.: 16086: 0: 99999: 7 :::
arms: $ 1 $ gKURq9W3 $ oYJWwNw9hKtJBmoVpkFju /: 16086: 0: 99999: 7 :::
admin: $ 1 $ 0.3jcW1k $ i6QabIE2yN0hCcTmrQ7j80: 16086: 0: 99999: 7 :::
netavis: $ 1 $ SQ4LOu8J $ Gp6PEphFVKucMyQbkm55f1: 16086: 0: 99999: 7 :::
chpass: $ 1 $ CWDhlmfR $ b / IoN0Inx / A6eT04hivM / .: 16086: 0: 99999: 7 :::
It can be seen that the root password is there, but it does not coincide with the password that we set for the
admin .
The only way out is to change the
root password to the admin password known to us. Therefore, we erase the root password hash and change the
admin password to the hash, then save the file, unmount all file systems and reboot into Netavis.
Next, log in as root with the admin password we know and start looking around from the live system with root privileges.
We look, what hard drives are connected:[root @ videosystem ~] # fdisk -l
/ dev / sda1 * 1 13 104391 83 Linux
/ dev / sda2 14,664 5229157+ 83 Linux
/ dev / sda3 665 1315 5229157+ 83 Linux
/ dev / sda4 1316 2635 10602900 5 Extended
/ dev / sda5 1316 1966 5229126 83 Linux
/ dev / sda6 1967 2097 1052226 82 Linux swap / Solaris
/ dev / sda7 2098 2635 4321453+ 83 Linux
/ dev / sdb1 1 1045 8388607+ ee EFI GPT
/ dev / sdc1 1 1045 8388607+ ee EFI GPT
3 hard disks are connected - system (dev / sda) and two archive disks (dev / sdb dev / sdc) and they are mounted accordingly:
Hidden text[root @ videosystem ~] # mount
/ dev / sda7 on / Images / Images1 type xfs (rw, noatime, nodiratime, logbufs = 8, logbsize = 256k, allocsize = 256k)
/ dev / sdb1 on / Images / Images3 type xfs (rw, noatime, nodiratime, logbufs = 8, logbsize = 256k, allocsize = 256k)
/ dev / sdc1 on / Images / Images4 type xfs (rw, noatime, nodiratime, logbufs = 8, logbsize = 256k, allocsize = 256k)
But what we have in fstab:LABEL = Images1 / Images / Images1 xfs noauto 1 0
LABEL = Images2 / Images / Images2 xfs noauto 1 0
LABEL = Images3 / Images / Images3 xfs noauto 1 0
LABEL = Images4 / Images / Images4 xfs noauto 1 0
That is, there is a record of a replaced hard disk, which is actually not in the server. Remove the mount point Images2 from fstab, save and reboot.
After loading, launch the client and go to the System administration - System information section and see that the error has not disappeared, so information about the used disks is stored somewhere ... and this is probably Mysql.
We understand with Mysql.
So you need to connect to the database server, and for this you need to know the logins and passwords for access. To do this, go to
/ var / lib / mysql and see which databases are available.
Here is the list of databases:
- arms
- mysql
- test
The mysql database is systemic; you can see a list of server users and password hashes in it. So - the final path to the file with the information we are interested in is
/va/lib/mysql/mysql/user.MYD - open the file in your favorite editor and see that there are not so many users -
root and
arms and the password hash is the same -
2f36c5e96b75ee48 , besides the old type, which is confirmed by viewing the config of the Mysql server, which is located along the path
/etc/my.cnf :
...
old_passwords = 1
...
Things are easy - either guess the password or brute force, which could take some time. I started by trying to guess the password, substituting known passwords, empty passwords, passwords that match the logins ... good luck smiled almost immediately.
For both logins (
root and
arms ) password -
armsNext, we will configure an SSH tunnel between the Netavis server and the computer on which we will launch one of the graphical tools for administering the Mysql database, for example,
MySQL Workbench or
Emma or any other that you usually use.
So, create a tunnel:
- On Linux -
using the ssh -L 3306 command
: localhost: 3306 root@192.168.0.5 , enter the password that we copied from the
admin user.
- Universal option - using Putty:


Next, we run Emma, ββfor example, tune in to the connection with localhost: 3306 and the
arms /
arms username / password and go straight to the base with which Netavis -
arms works.
Using the text search across the entire database for the keyword "Images2" (after all, this section we are trying to remove from the program settings) we get the result in the form of a
Directories table, in which the required information is stored:

Delete the entry with the information about Images2 and reboot the server.
After loading, start the client and go to the section System administration - System information and see that the error has disappeared!
The archive is written monolithically, the error of Degraded recording from the client interface disappeared, as well as information about the unused hard disk in the management console. Available file space is displayed correctly.
Thanks for attention.