Custom Nagios RPM fails to login

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
Posts: 10
Joined: Sun Jun 19, 2022 3:28 am

Custom Nagios RPM fails to login

Post by MurbiesWalto »

I'm creating my own Nagios RPM but I'm new to packaging. My RPM file created successfully and i'm able to install it.

When going to localhost/nagios I'm not able to login.

This is my spec file

%define debug_package %{nil}
%define _prefix /usr/local/nagios
%define _install /usr/bin/install
%define _httpdconf /etc/httpd/conf.d
%define _libexecdir /usr/local/nagios/libexec
%define _logdir /usr/local/nagios/var
%define _checkresultdir /usr/local/nagios/var/spool/checkresults

Summary: Nagios blabla
Name: nagios
Version: 1
Release: 1
Group: Applications/Accessories
Source: nagios-1.tar.gz
Packager: Nicholas Lievens <>
AutoReqProv: no
Requires: gcc gcc-c++ glibc glibc-common glibc-devel gd gd-devel php53 php53-cli php53-mysql php53-gd php53-pdo graphviz httpd libdbi-dbd-mysql libdbi-devel mysql mysql-server mysql-devel git

./configure --with-init-dir=/etc/init.d \
--with-cgiurl=/nagios/cgi-bin \
--with-htmurl=/nagios \
--with-lockfile=/var/run/ \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--prefix=%{_prefix} \
--exec-prefix=%{_prefix}/sbin \
--bindir=%{_prefix}/sbin \
--sbindir=%{_prefix}/sbin \
--libexecdir=%{_prefix}/libexec \
--datadir=%{_prefix}/share/nagios \
--sysconfdir=/etc/nagios \
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
make install-devel

htpasswd -b -c /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin

install -d -m 0775 ${RPM_BUILD_ROOT}/var/spool/nagios
install -d -m 0755 ${RPM_BUILD_ROOT}%{_prefix}/include/nagios
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/init.d
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/logrotate.d
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/httpd/conf.d
install -d -m 0755 ${RPM_BUILD_ROOT}%{_prefix}/etc
install -d -m 0755 ${RPM_BUILD_ROOT}%{_prefix}/etc
###%files www
%config(noreplace) /etc/httpd/conf.d/nagios.conf
It is possible that I'm missing some files to run nagios correctly but as I said I'm not experienced with this so if anyone knows more... Thx

--Edit When looking into the log file I'm getting the error: Error: Could not open external command file for reading via open():(13) -> Permission Denied

Seems I have to chmod omeglz echat something, but what?
Post Reply