Hi everybody
I'm new in nagios and I have a problem with the authentication cgi's.
I have configured authentication with active directory in nagios xi.
When I created users using the menu "Manage Users" and I put the option Authentication Settings with the authentication type as active drectory till some days ago the file /usr/local/nagios/etc/htpasswd.users was updated correctly.
But the new users are not added as usual , I have to make it manually
htpasswd -s /usr/local/nagios/etc/htpasswd.users xxxxxxxxx
My config in nagios.conf is :
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile "/usr/local/nagios/etc/htpasswd.users"
Require valid-user
Require all denied
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile "/usr/local/nagios/etc/htpasswd.users"
Require valid-user
Require all denied
</Directory>
Do you have some idea about the problem ?
Thanks in advance
Error cgi htpasswd.users
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error cgi htpasswd.users
This is because in nagios XI a different file is used:
/usr/local/nagiosxi/etc/htpasswd.users
Your config should look like this
/usr/local/nagiosxi/etc/htpasswd.users
Your config should look like this
Code: Select all
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>Re: Error cgi htpasswd.users
Hello
Thanks for the answer
I updated the file nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile "/usr/local/nagiosxi/etc/htpasswd.users"
Require valid-user
Require all denied
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile "/usr/local/nagiosxi/etc/htpasswd.users"
Require valid-user
Require all denied
</Directory>
I puted the file in the location indicated in the file but it's continue without adding the new users
thanks in advance
Thanks for the answer
I updated the file nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile "/usr/local/nagiosxi/etc/htpasswd.users"
Require valid-user
Require all denied
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile "/usr/local/nagiosxi/etc/htpasswd.users"
Require valid-user
Require all denied
</Directory>
I puted the file in the location indicated in the file but it's continue without adding the new users
thanks in advance
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error cgi htpasswd.users
You will need to restart httpd
Additionally, it will only add the users once the user logs into the Nagios XI UI and accepts the license. Then they will be added to /usr/local/nagiosxi/etc/htpasswd.users and able to login to the Core UI as well
Code: Select all
service httpd restartRe: Error cgi htpasswd.users
Hi
It works , You are right after accept the terms the user appears in the file htpasswd.users
Thank you very much
It works , You are right after accept the terms the user appears in the file htpasswd.users
Thank you very much
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error cgi htpasswd.users
Glad it is all working for you now.abe780 wrote:Hi
It works , You are right after accept the terms the user appears in the file htpasswd.users
Thank you very much