NLS Unable to log in

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
mquibell
Posts: 6
Joined: Fri Jan 05, 2018 2:38 pm

NLS Unable to log in

Post by mquibell »

I've just installed an 60-day eval of NLS. It was not easy. After fixing several fullinstall errors, I got it to finally succeed in installing. Now I can't log in. I see the users I create with

curl -XPOST 'http://localhost:9200/nagioslogserver/user/' -d '{"username":"someuser","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@example.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}'

in the database, but it always tells me invalid password. Help meh!

TIA!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NLS Unable to log in

Post by tmcdonald »

What OS and version are you installing on, and is it a fresh OS install? We officially support CentOS and RedHat versions 6 and 7 for the latest Nagios Log Server. Any other OS in unsupported at this time, and previous modifications to the system can cause issues, typically if a security team locks down sudoers or configured selinux too tightly.
Former Nagios employee
mquibell
Posts: 6
Joined: Fri Jan 05, 2018 2:38 pm

Re: NLS Unable to log in

Post by mquibell »

Hello sir,
The server is CentOS, release 6.3 (Final). It is not locked down to sudoer use only, for example. Thanks!

Also, when I went into the web gui and "Finished installation" by creating a username and all that, it said "Please wait..." for about 30 mins, so I restarted the host.
mquibell
Posts: 6
Joined: Fri Jan 05, 2018 2:38 pm

Re: NLS Unable to log in

Post by mquibell »

FYI, it recognizes the username I create, just not the password.
mquibell
Posts: 6
Joined: Fri Jan 05, 2018 2:38 pm

Re: NLS Unable to log in

Post by mquibell »

# curl -XGET 'http://localhost:9200/nagioslogserver/_ ... ser&pretty'
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : 1.0,
"hits" : [ {
"_index" : "nagioslogserver",
"_type" : "user",
"_id" : "2",
"_score" : 1.0,
"_source":{"username":"nagiosadmin","anotherpassword":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@mail.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2018-01-18 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default","forgotten_password_code":"651720020f1c4cd1b09f807df2a83b455431a872f1cd6ebcb1414d816463f2d9","forgotten_password_time":1516302198}
}, {
"_index" : "nagioslogserver",
"_type" : "user",
"_id" : "AWEKqVUrbh02-23pPlHM",
"_score" : 1.0,
"_source":{"username":"someuser","passwordhere":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@example.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}
} ]
}
}
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NLS Unable to log in

Post by npolovenko »

@mquibell, Your command is going to work if you insert 2 after /user/. Like this:

Code: Select all

curl -XPOST 'http://localhost:9200/nagioslogserver/user/2' -d '{"username":"someuser","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@example.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mquibell
Posts: 6
Joined: Fri Jan 05, 2018 2:38 pm

Re: NLS Unable to log in

Post by mquibell »

Thanks, but I did that with the nagiosadmin account. You can see where ID=2. I tried creating another user, with .../user/1 and it recognizes the name, but not the password.
mquibell
Posts: 6
Joined: Fri Jan 05, 2018 2:38 pm

Re: NLS Unable to log in

Post by mquibell »

I went back to creating the nagiosadmin account and then reset the password via the script. Works! Thanks!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NLS Unable to log in

Post by npolovenko »

@mquibell, Great! Do you have other questions for us or is it ok to lock this thread as resolved?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked