Page 1 of 1

unable to log in with nagiosadmin - new install

Posted: Wed Dec 04, 2024 2:21 pm
by sfarrell
New install of Nagios Logserver using the latest version. When try to log in with "nagiosadmin" I get error "Invalid username or password".

I've tried resetting the password using "/usr/local/nagioslogserver/scripts/reset_nagiosadmin_password.sh --password newpassword" but it still fails. I'm not using any special character just letters and numbers.

I have tried the following with no luck

Code: Select all

curl -XPUT 'http://localhost:9200/nagioslogserver/user/2' -d '{"username":"nagiosadmin","username_lower":"nagiosadmin","name":"Nagios Administrator","password":"280d44ab1e9f79b5cce2dd4f58f5fe91f0fbacdac9f7447dffc318ceb79f2d02","auth_type":"admin","email":"[email protected]","language":"default","apiaccess":"1","apikey":"721d387b623e725076b68b4760489ead197ddb7b","created":"2021-06-14 12:10:14","created_by":0,"default_dashboard":"/dashboard/elasticsearch/AXoLSc8Q5hxpyzbmI-kt"}'

Then

Code: Select all

curl -XGET http://localhost:9200/nagioslogserver/user/2
With output

Code: Select all

{"_index":"nagioslogserver","_type":"user","_id":"2","_version":8,"found":true,"_source":{"username":"nagiosadmin","username_lower":"nagiosadmin","name":"Nagios Administrator","password":"280d44ab1e9f79b5cce2dd4f58f5fe91f0fbacdac9f7447dffc318ceb79f2d02","auth_type":"admin","email":"[email protected]","language":"default","apiaccess":"1","apikey":"721d387b623e725076b68b4760489ead197ddb7b","created":"2021-06-14 12:10:14","created_by":0,"default_dashboard":"/dashboard/elasticsearch/AXoLSc8Q5hxpyzbmI-kt"}}


Re: unable to log in with nagiosadmin - new install

Posted: Thu Dec 05, 2024 10:30 am
by jsimon
Hi @sfarrell,

I would recommend retrying the curl call from your post with a userid of 1 instead of 2. The default admin account should be getting created with an ID of 1, so it is likely you're taking the right steps but on the wrong account. Let us know if you run into any further issues with this.

Re: unable to log in with nagiosadmin - new install

Posted: Thu Dec 05, 2024 11:20 am
by sfarrell
Thank you for your response. I changed the curl command to use user 1 instead of user 2 but I'm still having the same problem.

Is there a way to put this in debug mode so i can see a more detailed error message?

Re: unable to log in with nagiosadmin - new install

Posted: Thu Dec 05, 2024 11:35 am
by sfarrell
I am able to log in to the gui using

Code: Select all

http://nagiosadmin:newpassword@[IPADDRESS}/nagioslogserver/
However if i log out and try to log in thru the regular login screen i get the invalid username/password error.

Re: unable to log in with nagiosadmin - new install

Posted: Thu Dec 05, 2024 12:00 pm
by sfarrell
It seems like something "clicked" and I'm now able to log in via the GUI.

Thanks for your help!