Have almost same issue like the following URL
https://support.nagios.com/forum/viewto ... 16&t=49898
output from the system (NagiosXI 5.5.2 on RHEL7):
the original reason for the debug is the following line at /var/log/messages:tail -f /app/nagiosxi/var/nom.log
Password: su: Permission denied
ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest'
Config test failed. Checkpoint aborted.
~]# /usr/local/nagiosxi/scripts/nom_create_nagioscore_checkpoint_cond.sh
OK.
--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
/usr/local/nagiosxi/nom/checkpoints/nagioscore ~
tar: Removing leading `/' from member names
~
Config test passed. Checkpoint created.
~]# ls -al /usr/local/nagios/var/nagios.configtest
-rw-rw-r--+ 1 nagios nagios 11730363 Nov 7 08:44 /usr/local/nagios/var/nagios.configtest
#but the nex time run - croned 1 min result is again:
~]# ls -al /usr/local/nagios/var/nagios.configtest
ls: cannot access /usr/local/nagios/var/nagios.configtest: No such file or directory
Password: su: Permission denied
ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest'
Config test failed. Checkpoint aborted.
Nov 4 03:12:02 NAGIOSHOST su: FAILED SU (to nagios) nagios on none
which is actually try to log in to our AD without success and make non cancallable failure audit on our NagiosXI and AD side servers.
OUR sudoers file contain the following lines:
and touching the file makes also no sense:~]# grep NAGIOSXI /etc/sudoers
User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_ssl_config.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
notice:~]# su nagios -c "touch /usr/local/nagios/var/nagios.configtest"
~]# echo $?
0
#the error is same after the touch
Password: su: Permission denied
ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest'
Config test failed. Checkpoint aborted.
ls -l /usr/local/
...
lrwxrwxrwx 1 root root 11 Apr 18 2018 nagios -> /app/nagios
lrwxrwxrwx 1 root root 17 Apr 18 2018 nagiosmobile -> /app/nagiosmobile
lrwxrwxrwx 1 nagios nagios 13 Apr 18 2018 nagiosxi -> /app/nagiosxi
what can be the cause of our problem?
Thank you, best regards,
Ferenc