Debe resolver el dominio:
[root@server~]# cat /etc/hosts|grep dominio
192.168.0.1 mi.dominio.net server_ad
Configuramos el apache, cambie los datos en rojo según su dominio:
[root@server~]# vi /ruta/del/apache/conf/extra/nagios.conf
ScriptAlias /nagios/cgi-bin "/ruta/del/nagios/nagios/sbin"
AuthBasicProvider ldap
AuthType Basic
AuthName "Auth Active Directory"
AuthLDAPURL "ldap://mi.dominio.net:389/DC=mi,DC=dominio,DC=net?sAMAccountName?sub?(objectClass=user)" NONE
AuthLDAPBindDN "usuario@mi.dominio.net"
AuthLDAPBindPassword "ACA VA EL PASSWORD DEL USER DE ARRIBA"
require ldap-attribute objectClass=user
Alias /nagios "/ruta/del/nagios/nagios/share"
AuthBasicProvider ldap
AuthType Basic
AuthName "Auth Active Directory"
AuthLDAPURL "ldap://mi.dominio.net:389/DC=mi,DC=dominio,DC=net?sAMAccountName?sub?(objectClass=user)" NONE
AuthLDAPBindDN "usuario@mi.dominio.net"
AuthLDAPBindPassword "ACA VA EL PASSWORD DEL USER DE ARRIBA"
require ldap-attribute objectClass=user
Reiniciamos Apache:
[root@server~]# /etc/init.d/httpd stop
[root@server~]# /etc/init.d/httpd start
Agregamos el usuario en nagios:
[root@Server~]# vi /ruta/del/nagios/etc/cgi.cfg
authorized_for_system_information=admin,usuario .....
Testeamos la config y reiniciamos nagios:
[root@Server~]# /ruta/del/nagios/bin/nagios -v /ruta/del/nagios/etc/nagios.cfg
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
[root@Server~]# /etc/init.d/nagios reload
Running configuration check...done.
Reloading nagios configuration...done