Page 1 of 1

New account issues.

Posted: Sun May 07, 2017 6:02 am
by ssami
Hi,

I have added a new account to access our Nagios using usual way i always follow. it's just this time when the user tried to login he kept getting below message. I have restarted Nagios services and Apache2 as well but still the same.. Any idea how to fix it?

" It appears as though you do not have permission to view the configuration information you requested...

If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file."


PS: this user is part of group who has access to all hosts

Re: New account issues.

Posted: Mon May 08, 2017 10:56 am
by tmcdonald
Please provide two things:
  • Describe the usual way you always follow to add new accounts
  • A screenshot of the error so we can see where and how it is appearing

Re: New account issues.

Posted: Tue May 09, 2017 12:09 am
by ssami
Hi,

I winscp to nagios, then brows to this directory: etc> nagios>objects>contacts> contacts.cfg and add the user in the list ( as below), then restart nagios services.

define contact{
contact_name exampleUN
use generic-contact
alias firstname lastname
email [email protected]
contactgroups ITHelpdeskTechs
}


PS: ITHelpdeskTechs group has access to view all hosts , and all other users who were added previously are able to view the hosts

Error we are getting is attached

Re: New account issues.

Posted: Tue May 09, 2017 2:34 pm
by dwhitfield
That looks and sounds a lot like Nagios Core. Did you mean to post this in the Nagios Log Server forum? If not, I can move it. Also, can you provide a full screenshot rather than a cropped image so that we can verify? Thanks!

Re: New account issues.

Posted: Thu May 11, 2017 12:13 am
by ssami
Hi,

Yes it is, core version 3.2.

A full screen of the GUI is attached.

Re: New account issues.

Posted: Thu May 11, 2017 12:19 am
by tacolover101
you posted in the wrong forum.. might be better off posting in the nagios core one.

as for your problem, what user are oyu using and post your nagios.cfg that goes with it.

Re: New account issues.

Posted: Thu May 11, 2017 9:25 am
by dwhitfield
What's the output of ls -laR /etc/nagios/? Please put that output in a file or wrap it in a code block (it's the 5th button over on the edit window)

Was your Core compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use.

Re: New account issues.

Posted: Tue May 16, 2017 8:07 am
by ssami
dwhitfield wrote:What's the output of ls -laR /etc/nagios/? Please put that output in a file or wrap it in a code block (it's the 5th button over on the edit window)

Was your Core compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use.
Hi,

version is Gentoo Base System release 1.12.13.

Please find the command output below:

Code: Select all

drwxr-x--x  3 nagios nagios  4096 Dec 13  2009 .
drwxr-xr-x 61 root   root    4096 Feb 20 00:50 ..
-rw-r--r--  1 root   root       0 Dec 13  2009 .keep_net-analyzer_nagios-core-0
-rw-rw-r--  1 nagios nagios 11471 Dec 21  2009 cgi.cfg
-rw-r--r--  1 apache root      74 Dec 22  2009 htpasswd.users
-rw-rw-r--  1 nagios nagios 44094 Aug  5  2009 nagios.cfg
-rw-r--r--  1 root   root    4010 Aug 25  2013 ndo2db.cfg
-rw-r--r--  1 root   root    4731 Jul 28  2009 ndomod.cfg
drwxrwxr-x  6 nagios nagios  4096 Dec 21  2009 objects
-rw-rw-r--  1 nagios nagios  1460 Feb  7  2010 resource.cfg

/etc/nagios/objects:
total 64
drwxrwxr-x 6 nagios nagios 4096 Dec 21  2009 .
drwxr-x--x 3 nagios nagios 4096 Dec 13  2009 ..
drwxr-xr-x 2 root   root   4096 Jul 28  2009 Commands
drwxr-xr-x 2 root   root   4096 Jan 27  2016 Contacts
drwxr-xr-x 2 root   root   4096 Jul 28  2009 Hosts
drwxr-xr-x 2 root   root   4096 Jan 10  2013 Services
-rw-rw-r-- 1 nagios nagios 7694 Dec 13  2009 commands.cfg
-rw-r--r-- 1 root   root   1106 Mar 24  2009 dependencies.cfg
-rw-r--r-- 1 root   root   1106 Mar 24  2009 escalations.cfg
-rw-rw-r-- 1 nagios nagios 5403 Dec 13  2009 localhost.cfg
-rw-r--r-- 1 root   root   9901 Dec 21  2009 templates.cfg
-rw-r--r-- 1 root   root   1294 Jul 12  2009 timeperiods.cfg

/etc/nagios/objects/Commands:
total 24
drwxr-xr-x 2 root   root   4096 Jul 28  2009 .
drwxrwxr-x 6 nagios nagios 4096 Dec 21  2009 ..
-rw-r--r-- 1 root   root   9277 Feb 11  2011 checkcommands.cfg
-rw-r--r-- 1 root   root   3814 Dec 21  2009 misccommands.cfg

/etc/nagios/objects/Contacts:
total 36
drwxr-xr-x 2 root   root    4096 Jan 27  2016 .
drwxrwxr-x 6 nagios nagios  4096 Dec 21  2009 ..
-rw-r--r-- 1 root   root    1494 Aug  3  2016 contactgroups.cfg
-rw-r--r-- 1 root   root   10014 Apr 18 13:48 contacts.cfg
-rw-r--r-- 1 root   root   10027 Oct 27  2015 contacts.cfg.bkup

/etc/nagios/objects/Hosts:
total 32
drwxr-xr-x 2 root   root   4096 Jul 28  2009 .
drwxrwxr-x 6 nagios nagios 4096 Dec 21  2009 ..
-rw-r--r-- 1 root   root   1106 Mar 24  2009 hostextinfo.cfg
-rw-r--r-- 1 root   root   1523 Oct  4  2016 hostgroups.cfg
-rw-r--r-- 1 root   root   6117 Oct 16  2016 hosts-network.cfg
-rw-r--r-- 1 root   root   1353 Nov 15  2015 hosts-servers.cfg
-rw-r--r-- 1 root   root   1033 Dec 22  2009 hosts.cfg

/etc/nagios/objects/Services:
total 36
drwxr-xr-x 2 root   root   4096 Jan 10  2013 .
drwxrwxr-x 6 nagios nagios 4096 Dec 21  2009 ..
-rw-r--r-- 1 root   root   5248 Nov 15  2015 service-network-interfaces.cfg
-rw-r--r-- 1 root   root   1106 Mar 24  2009 serviceextinfo.cfg
-rw-r--r-- 1 root   root    625 Jan 13  2010 servicegroups.cfg
-rw-r--r-- 1 root   root   2174 Oct  4  2016 services-network.cfg
-rw-r--r-- 1 root   root   1160 Dec 22  2009 services-servers.cfg
-rw-r--r-- 1 root   root   1783 Mar  6  2011 services.cfg

Re: New account issues.

Posted: Tue May 16, 2017 2:00 pm
by dwhitfield
On a normal setup, all of those cfg files have a chown apache.nagios. It's possible nagios.nagios will work or apache.apache will work depending on how you have your groups set up, but root.root is unlikely to work.

As a gentoo user, I would really suggest recompiling your nagios and using the latest version: https://support.nagios.com/kb/article.php?id=96

We don't have gentoo-specific instructions, but as long as you know how to call your compiler and the name of your apache (apache2 vs. httpd vs something else), then those instructions should work for you.