Page 1 of 1
Issues with logging in as different users
Posted: Fri Nov 11, 2016 12:32 pm
by neworderfac33
Good afternoon
I have a number of different authenticated users within my Nagios Core setup.
My understanding is, if I want to go from one user to another (in this case, to test that each user can only see host details for the hosts to which they should have access) that I can't log out, but rather have to:
close my browser
restart it
enter /nagios/nagios as my URL and
enter the username and password for the different user.
However, once I've restarted the browser, Nagios doesn't recognize the revised login details UNLESS I do a password reset for the user who I'm trying to log in as.
When the "Authentication Required" dialog box displays, it always come up with "nagiosadmin" displayed in the "User name" field.
Hope someone can help me out - and have a nice weekend, everyone.
Pete
Re: Issues with logging in as different users
Posted: Fri Nov 11, 2016 1:53 pm
by avandemore
Nagios Core by default uses Apache's Basic Auth, so this is not really a "Nagios" question. Please see here for more information:
Enhanced CGI Security and Authentication
However, once I've restarted the browser, Nagios doesn't recognize the revised login details UNLESS I do a password reset for the user who I'm trying to log in as.
When the "Authentication Required" dialog box displays, it always come up with "nagiosadmin" displayed in the "User name" field.
This is a browser issue, not a "Nagios" either. Generally you must clear the browser cache to login as a different user when using Apache Basic Auth. The process for doing so varies by browser.
Re: Issues with logging in as different users
Posted: Sat Nov 12, 2016 3:37 pm
by neworderfac33
I'm using Chrome. Can you suggest anything, please? However I still don't understand how, if it isn't a Nagios issue, how resetting the user's password resolves the issue?
Thank you
Pete
Re: Issues with logging in as different users
Posted: Mon Nov 14, 2016 10:55 am
by rkennedy
if it isn't a Nagios issue, how resetting the user's password resolves the issue?
This ends up nullifying the basic auth session because of the password change. This is out of Nagios's control unfortunately. Take a look at this link for more of an explanation -
https://en.wikipedia.org/wiki/Basic_acc ... entication
Re: Issues with logging in as different users
Posted: Mon Nov 14, 2016 11:41 am
by neworderfac33
Thanks for this information, but I still don't appear to be any nearer to resolving my issue.
I've spent all afternoon trying different combinations of clearing the cache and restarting the browser, but the only way in which I am able to log in as a new user is if I do a password reset for that user first.
I can continue to log in as the original user, but if I try to login as any other user, i'm just presented with the login details prompt again.
Surely that can't be right?
Thanks
Pete
Re: Issues with logging in as different users
Posted: Mon Nov 14, 2016 11:46 am
by dwhitfield
Try incognito mode for each log in and let us know how that goes:
https://support.google.com/chrome/answer/95464?hl=en
Thanks!
Re: Issues with logging in as different users
Posted: Mon Nov 14, 2016 12:01 pm
by neworderfac33
It's just the same - it just keeps coming back with the prompt to enter the username and password, but if I do a password reset (not even CHANGING the password, just using the same one) I can then log in as any of my other users, without having to clear the cache.
Code: Select all
htpasswd -c /usr/local/nagios/etc/htpasswd.users peterooney
Pete
Re: Issues with logging in as different users
Posted: Mon Nov 14, 2016 12:06 pm
by dwhitfield
What version of Core are you using? If not 4.2.2, could you upgrade?
https://assets.nagios.com/downloads/nag ... ading.html
If this is a bug, I want to make sure it is in the latest version. Thanks!
Re: Issues with logging in as different users
Posted: Tue Nov 15, 2016 5:35 am
by neworderfac33
We're only on 4.0.8, I'm afraid and the person who did the original installation left the company three months ago.
But I'm sure I could give it a try if that was the only option.
Off the top of your head, are there any major changes in functionality between the two versions of it is just bug fixes/stability issuers that are addressed?
Pete
Re: Issues with logging in as different users
Posted: Tue Nov 15, 2016 10:10 am
by dwhitfield
peterooney wrote:
Off the top of your head, are there any major changes in functionality between the two versions of it is just bug fixes/stability issuers that are addressed?
There are a couple of permissions fixes which might be helpful in your case, but ultimately the issue is we are pretty sure this is not a Nagios issue. If it turns out it is a Nagios issue, we need to fix it in the current code, not 4.0.8.
Full change log at
https://www.nagios.org/projects/nagios-core/history/4x/