Issues with logging in as different users

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.
Locked
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Issues with logging in as different users

Post 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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Issues with logging in as different users

Post 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.
Previous Nagios employee
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Issues with logging in as different users

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Issues with logging in as different users

Post 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
Former Nagios Employee
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Issues with logging in as different users

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Issues with logging in as different users

Post 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!
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Issues with logging in as different users

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Issues with logging in as different users

Post 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!
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Issues with logging in as different users

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Issues with logging in as different users

Post 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/
Locked