Page 1 of 2

Problem installing NagiosXI

Posted: Tue Mar 28, 2017 9:44 am
by treddy
Hi,

I am trying to install NagiosXI on CentOS 7 - using Option 2 (MySql Community) and ending up with error "ERROR 1819 (HY000) at line 3: Your password does not satisfy the current policy requirements" while installing ndoutils steps. I have attached install log for your reference.

I am using complex mysql password - Kirikkupayya_12 (example)

We have a production NagiosXI hosted on CentOS 6.5 and our security scanners are finding many vulnerabilities. To remediation, we are trying to migrate NagiosXI to CentOS 7 hosted server to stay updated.

Any help on this is much appreciated.

Thanks,
Thrivikram

Re: Problem installing NagiosXI

Posted: Tue Mar 28, 2017 11:08 am
by cdienger
Greetings,

Try changing the mysqlpass variable found in /tmp/nagiosxi/xi-sys.cfg to a more secure password that meets your system requirements and then running the install script again.

Re: Problem installing NagiosXI

Posted: Thu Mar 30, 2017 3:19 am
by treddy
We tried using more complex password by editing /tmp/nagiosxi/xi-sys.conf , but still giving the same error.

current mysql password policy - MEDIUM

+--------------------------------------+--------+
| Variable_name | Value |
+--------------------------------------+--------+
| validate_password_dictionary_file | |
| validate_password_length | 8 |
| validate_password_mixed_case_count | 1 |
| validate_password_number_count | 1 |
| validate_password_policy | MEDIUM |
| validate_password_special_char_count | 1 |
+--------------------------------------+--------+

Re: Problem installing NagiosXI

Posted: Thu Mar 30, 2017 10:23 am
by cdienger
I'll poke around and see if there's somewhere else that we may need to set it but I was fairly certain that that would be the one in xi-sys.conf. Just to be certain, the policy requires that passwords must contain at least 1 numeric character, 1 lowercase character, 1 uppercase character, and 1 special (nonalphanumeric) character. I assume these conditions were met?

Re: Problem installing NagiosXI

Posted: Thu Mar 30, 2017 10:20 pm
by treddy
Yes, all the conditions are met. Even tried with most complex passwords. Nothing worked.

Re: Problem installing NagiosXI

Posted: Fri Mar 31, 2017 12:12 pm
by cdienger
Is this on a minimal OS install as recommend by our docs? The fact that mysql is already installed and configured to enforce a password policy suggests that the system may be already be utilized in some capacity or modified outside the scope of a minimal install. We can try to work around this password issue but in the end we may run into other problems or conflicts with existing system configs. Is disabling the mysql validate-password plugin an option?

Re: Problem installing NagiosXI

Posted: Mon Apr 03, 2017 4:52 am
by treddy
I have changed /etc/my.cnf file and added the below lines to change complexity and restarted mysqld service.
validate_password_policy=LOW
validate_password_length=4
validate_password_mixed_case_count=0
validate_password_number_count=0
validate_password_special_char_count=0

I was able to overcome this password issue, but ran into different error:

Code: Select all

/bin/install -c -m 644 startup/default-service /usr/lib/systemd/system/ndo2db.service
NDOUTILS-POST
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
NOTE: If prompted, enter the MySQL root password
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1396 (HY000) at line 3: Operation CREATE USER failed for 'ndoutils'@'localhost'
ERROR: Subcomponent 'ndoutils' installation failed - exiting.
Subcomponents installation failed - exiting
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './A-subcomponents'

Re: Problem installing NagiosXI

Posted: Mon Apr 03, 2017 8:07 am
by dwhitfield
This is again probably due to it not being a fresh system but as the error suggests, can you please post your install.log? Thanks!

Re: Problem installing NagiosXI

Posted: Wed Apr 05, 2017 6:03 am
by sharath.gangatv
Tried to install Nagios on a fresh system running CentOS 7.3 but ran into this error posted below. I'm attaching the install.log, can you please check and advise?

Code: Select all

MRTG-POST
MRTG installed OK
Subcomponent 'mrtg' installed OK
Subcomponents installed OK
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Checking MySQL status...
MySQL running - continuing...
Setting up Nagios XI database...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1067 (42000) at line 25: Invalid default value for 'event_time'
ERROR: Nagios XI database was not setup properly - exiting.

Re: Problem installing NagiosXI

Posted: Wed Apr 05, 2017 6:14 am
by sharath.gangatv
Steps that lead to the error below:

I just started with a clean installation server today –

Installed epel-release-7-9.noarch.rpm and nagios-repo-7-2.el7.noarch.rpm present in /tmp/nagiosxi/packages
[root@server yum.repos.d]# yum list installed | grep mariadb
[root@server yum.repos.d]# yum list installed | grep mysql
We should install mysql and mysql-server before we continue to install Nagios
wget https://dev.mysql.com/get/mysql57-commu ... noarch.rpm
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
[root@server sysconfig]# yum install mysql mysql-server
[root@server etc]# systemctl start mysqld
[root@server etc]# vi /etc/my.cnf
Add below lines to file –
validate_password_length=4
validate_password_mixed_case_count=0
validate_password_number_count=0
validate_password_policy=LOW
validate_password_special_char_count=0
[root@server etc]# systemctl restart mysqld
[root@server etc]# grep "password" /var/log/mysqld.log
2017-04-05T10:20:04.971084Z 1 [Note] A temporary password is generated for root@localhost: <u4UvCjW%_Bm
Make note of temp password and we need to change it before we continue.
[root@server etc]# mysql -u root -p
Enter password: <u4UvCjW%_Bm
Mysql> SET PASSWORD = PASSWORD('nagiosxi');
Mysql>flush privileges;
Mysql>quit
Cd /tmp/nagiosxi
./fullinstall
It looks like MySQL and MariaDB are available on your system. Please pick one:
1 - MariaDB (Default)
2 - MySQL Community

----------------------------------------
Which DB server would you like to use? [1]: 2


Ending up with error –
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1067 (42000) at line 25: Invalid default value for 'event_time'
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './B-installxi'