Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Post Reply
NVESMM
Posts: 11
Joined: Thu Oct 27, 2022 1:31 pm

Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by NVESMM »

Hello.

We are recently having issues logging into the Web GUI for our test environment for our nagios log server with all accounts including our nagiosadmin account. Just in case, we reset the nagiosadmin account via the reset script in /usr/local/nagiosxi/scripts/reset_nagiosadmin_password.php but we are still having issues logging into it. It keeps saying invalid password when attempting log on.

We do have access to SSH and that is allowing us to log onto it just fine.
Capture.PNG
Are there any troubleshooting steps or particular logs I should be looking into?

Thank you.
You do not have the required permissions to view the files attached to this post.
User avatar
swolf
Developer
Posts: 361
Joined: Tue Jun 06, 2017 9:48 am

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by swolf »

Hi @NVESMM, thanks for reaching out.

Here are some steps to try:

1. If you haven't already, try resetting nagiosadmin's password to something that doesn't contain any whitespace or special characters. As much as this "shouldn't" be something that matters, the password you enter is going through a bash script and then into a NoSQL database that gives special treatment to whitespace, so it doesn't hurt to be safe.

2. If you're still having trouble, try rebooting the server and see if your login works immediately after that reboot.

3. If it does work after reboot, and then starts failing after a few hours, check your RAM and disk usage. When elasticsearch is low on either of these, it'll start giving bad results, which could be the cause of what you're seeing.

If you try these steps and they don't help, I'm going to recommend that you open a case so that our support team can help you troubleshoot your specific environment.

-Sebastian
Developer @ Nagios 2017-05-15 thru 2024-08-06
NVESMM
Posts: 11
Joined: Thu Oct 27, 2022 1:31 pm

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by NVESMM »

Thank you!

I reset the password again using /usr/local/nagioslogserver/scripts/reset_nagiosadmin_password.sh --password newpasswordhere making sure there aren't any whitespace or special characters.

I also tried to reboot the server and attempted to log in immediately after it was up and no luck. None of our domain accounts are allowing us to log into the Web GUI either.

Do you have any other suggestions aside from the support case?

Thanks again!
User avatar
jmichaelson
Posts: 241
Joined: Wed Aug 23, 2023 1:02 pm

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by jmichaelson »

THe only thing I can think of is to have you log in to a shell on your log server and execute the following:

Code: Select all

curl http://192.168.0.74:9200/nagioslogserver/user/1
DO NOT post the output here, but notice the string of characters for the password.

Change the password using the script again to something different. Run the same command and see if the encrypted password changes. If it changes, you *should* be able to log in as nagiosadmin with that password.

If you still can't, then I'm afraid you'll have to contact support.
Please let us know if you have any other questions or concerns.

-Jason
riahc3
Posts: 65
Joined: Thu Apr 05, 2018 9:36 am

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by riahc3 »

Nagios Log Server is bugged beyond use.

I recommend use using a ELK stack even though its harder.
User avatar
jmichaelson
Posts: 241
Joined: Wed Aug 23, 2023 1:02 pm

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by jmichaelson »

If there's a RAM issue with Elasticsearch in Nagios Log Server, there will be a RAM issue with any ELK stack. The good news on that front is that the Elasticsearch part is in the process of being replaced with Opensearch. We can't commit to a release date yet other than to say that its coming soon.
Please let us know if you have any other questions or concerns.

-Jason
User avatar
danderson
Posts: 206
Joined: Wed Aug 09, 2023 10:05 am

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by danderson »

NVESMM wrote: Thu Feb 08, 2024 4:55 pm Hello.

We are recently having issues logging into the Web GUI for our test environment for our nagios log server with all accounts including our nagiosadmin account. Just in case, we reset the nagiosadmin account via the reset script in /usr/local/nagiosxi/scripts/reset_nagiosadmin_password.php but we are still having issues logging into it. It keeps saying invalid password when attempting log on.

We do have access to SSH and that is allowing us to log onto it just fine. Capture.PNG

Are there any troubleshooting steps or particular logs I should be looking into?

Thank you.
I also ran into this issue. Did this happen after any specific Log Server upgrade? Did you start encountering after a reboot or something similar?
User avatar
danderson
Posts: 206
Joined: Wed Aug 09, 2023 10:05 am

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by danderson »

After some investigation, I think I found a fix. I noticed a bug where the output of openssl was different on CentOS 9, leading to the reset script not working.

If you are willing to run some terminal commands on the log server machine, here's what you can do:

Code: Select all

newpass="examplepassword"

passhash=$(printf "$newpass" | openssl sha256 | awk '{printf $2}')

update="{\"doc\":{\"password\":\"$passhash\"}}"

curl -XPOST http://localhost:9200/nagioslogserver/user/1/_update -d "$update" > /dev/null 2>&1

curl -XPOST http://localhost:9200/nagioslogserver/_refresh > /dev/null 2>&1
This fixed the issue for me.
Thiagoros
Posts: 5
Joined: Wed Jan 24, 2024 8:36 am

Re: Invalid password on Nagios Log Server Web GUI even after nagiosadmin password reset

Post by Thiagoros »

jmichaelson wrote: Mon Apr 22, 2024 1:22 pm If there's a RAM issue with Elasticsearch in Nagios Log Server, there will be a RAM issue with any ELK stack. The good news on that front is that the Elasticsearch part is in the process of being replaced with Opensearch. We can't commit to a release date yet other than to say that its coming soon.
It's reassuring to hear that Nagios Log Server is addressing potential RAM issues by transitioning to Opensearch, a promising development for ELK stack users. While a specific release date remains uncertain, the anticipation of this update brings hope for improved performance and reliability in the near future.
Post Reply